if (this.config.wsPort || this.config.server) {
      this.wsServer = new WebsocketServer(this.config)
      this.wsServer.addListener('connection', (sock: Socket) => {
        const jsonRpc = new JsonRPC(this.log, { batches: this.batches }, sock)
        this.connections[sock.id] = jsonRpc