From d64c4eb556e7b1491169e94bbb36ffdb9e356bf1 Mon Sep 17 00:00:00 2001 From: Nedyalko Dyakov <1547186+ndyakov@users.noreply.github.com> Date: Sun, 26 Oct 2025 00:51:24 +0300 Subject: [PATCH] Update internal/pool/conn_state.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- internal/pool/conn_state.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/pool/conn_state.go b/internal/pool/conn_state.go index bbd7d1b3..32fc5058 100644 --- a/internal/pool/conn_state.go +++ b/internal/pool/conn_state.go @@ -250,7 +250,8 @@ func (sm *ConnStateMachine) AwaitAndTransition( return sm.GetState(), ctx.Err() case err := <-w.done: // Transition completed (or failed) - // Note: waiterCount is decremented in notifyWaiters when waiter is removed + // Note: waiterCount is decremented either in notifyWaiters (when the waiter is notified and removed) + // or here (on timeout/cancellation). return sm.GetState(), err } }