From 7ef9c891dc54fc155e11fbc5f795259cf7413f97 Mon Sep 17 00:00:00 2001 From: Ilia Tsyplenkov Date: Mon, 3 Feb 2025 13:38:23 +0300 Subject: [PATCH] rpc: fix goroutine leaks in client handler --- rpc/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) }