aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorgary rong <garyrong0905@gmail.com>2019-04-10 16:47:09 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-04-10 16:47:09 +0800
commite4cb7b80d59a4154327ea96f4a040ef18ef90c5b (patch)
treebebb13d320ea82ae7711e5a27dbec7dfdaf5d7a4 /rpc
parent22e1d2ce034a8674327e1cf6c01aff3fca403f71 (diff)
downloadgo-tangerine-e4cb7b80d59a4154327ea96f4a040ef18ef90c5b.tar
go-tangerine-e4cb7b80d59a4154327ea96f4a040ef18ef90c5b.tar.gz
go-tangerine-e4cb7b80d59a4154327ea96f4a040ef18ef90c5b.tar.bz2
go-tangerine-e4cb7b80d59a4154327ea96f4a040ef18ef90c5b.tar.lz
go-tangerine-e4cb7b80d59a4154327ea96f4a040ef18ef90c5b.tar.xz
go-tangerine-e4cb7b80d59a4154327ea96f4a040ef18ef90c5b.tar.zst
go-tangerine-e4cb7b80d59a4154327ea96f4a040ef18ef90c5b.zip
rpc: cancel root context after all requests are served (#19430)
Diffstat (limited to 'rpc')
-rw-r--r--rpc/handler.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc/handler.go b/rpc/handler.go
index 92db89e2f..02ab06b6d 100644
--- a/rpc/handler.go
+++ b/rpc/handler.go
@@ -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)
}