From 369cc5d3efcd20cf7311af950f0b3b6b2aae9704 Mon Sep 17 00:00:00 2001 From: Mariano Date: Tue, 18 Mar 2025 16:17:10 -0300 Subject: [PATCH] rpc: prevent potential deadlock in websocket ping timer handling with Go 1.23+ --- rpc/websocket.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rpc/websocket.go b/rpc/websocket.go index 9f67caf859..9d823cc073 100644 --- a/rpc/websocket.go +++ b/rpc/websocket.go @@ -356,9 +356,7 @@ func (wc *websocketCodec) pingLoop() { return case <-wc.pingReset: - if !pingTimer.Stop() { - <-pingTimer.C - } + pingTimer.Stop() pingTimer.Reset(wsPingInterval) case <-pingTimer.C: