diff --git a/rpc/handler.go b/rpc/handler.go index f23b544b58..2b80fefe4c 100644 --- a/rpc/handler.go +++ b/rpc/handler.go @@ -315,8 +315,8 @@ func (h *handler) handleNonBatchCall(cp *callProc, msg *jsonrpcMessage) { // call goroutines to shut down. func (h *handler) close(err error, inflightReq *requestOp) { h.cancelAllRequests(err, inflightReq) - h.callWG.Wait() h.cancelRoot() + h.callWG.Wait() h.cancelServerSubscriptions(err) }