rpc: fix goroutine leaks in client handler

This commit is contained in:
Ilia Tsyplenkov 2025-02-03 13:38:23 +03:00
parent fc12dbe40b
commit 7ef9c891dc

View file

@ -315,8 +315,8 @@ func (h *handler) handleNonBatchCall(cp *callProc, 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.callWG.Wait()
h.cancelRoot() h.cancelRoot()
h.callWG.Wait()
h.cancelServerSubscriptions(err) h.cancelServerSubscriptions(err)
} }