Commit e4cb7b80 authored by gary rong's avatar gary rong Committed by Péter Szilágyi

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

parent 22e1d2ce
...@@ -151,8 +151,8 @@ func (h *handler) handleMsg(msg *jsonrpcMessage) { ...@@ -151,8 +151,8 @@ func (h *handler) handleMsg(msg *jsonrpcMessage) {
// call goroutines to shut down. // call goroutines to shut down.
func (h *handler) close(err error, inflightReq *requestOp) { func (h *handler) close(err error, inflightReq *requestOp) {
h.cancelAllRequests(err, inflightReq) h.cancelAllRequests(err, inflightReq)
h.cancelRoot()
h.callWG.Wait() h.callWG.Wait()
h.cancelRoot()
h.cancelServerSubscriptions(err) h.cancelServerSubscriptions(err)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment