rpc: prevent potential deadlock in websocket ping timer handling with Go 1.23+

This commit is contained in:
Mariano 2025-03-18 16:17:10 -03:00
parent c4f0450710
commit 369cc5d3ef
No known key found for this signature in database
GPG key ID: 4E60833EF607F777

View file

@ -356,9 +356,7 @@ func (wc *websocketCodec) pingLoop() {
return return
case <-wc.pingReset: case <-wc.pingReset:
if !pingTimer.Stop() { pingTimer.Stop()
<-pingTimer.C
}
pingTimer.Reset(wsPingInterval) pingTimer.Reset(wsPingInterval)
case <-pingTimer.C: case <-pingTimer.C: