mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
rpc: prevent potential deadlock in websocket ping timer handling with Go 1.23+
This commit is contained in:
parent
c4f0450710
commit
369cc5d3ef
1 changed files with 1 additions and 3 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue