From 7edc9ce339e6c5c7c08203c2c748b02ebe79c82b Mon Sep 17 00:00:00 2001 From: hyeonLewis Date: Tue, 31 Dec 2024 12:58:02 +0900 Subject: [PATCH] metrics: Decrease pending requests count --- networks/rpc/handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/networks/rpc/handler.go b/networks/rpc/handler.go index f2f8edeef..6c25adaba 100644 --- a/networks/rpc/handler.go +++ b/networks/rpc/handler.go @@ -256,6 +256,7 @@ func (h *handler) startCallProc(fn func(*callProc)) { defer h.callWG.Done() defer cancel() defer atomic.AddInt64(&pendingRequestCount, -1) + defer rpcPendingRequestsCount.Dec(1) fn(&callProc{ctx: ctx}) }() }