rpc: cancel root context after all requests are served (#19430)

This commit is contained in:
gary rong 2019-04-10 16:47:09 +08:00 committed by Péter Szilágyi
parent 22e1d2ce03
commit e4cb7b80d5

@ -151,8 +151,8 @@ func (h *handler) handleMsg(msg *jsonrpcMessage) {
// call goroutines to shut down.
func (h *handler) close(err error, inflightReq *requestOp) {
h.cancelAllRequests(err, inflightReq)
h.cancelRoot()
h.callWG.Wait()
h.cancelRoot()
h.cancelServerSubscriptions(err)
}