• Felix Lange's avatar
    rpc: attempt to fix ping/pong logic race (#27733) · 8f8ef2bc
    Felix Lange authored
    This should fix #27726. With enough load, it might happen that the SetPongHandler 
    callback gets invoked before the call to SetReadDeadline is made in pingLoop. When 
    this occurs, the socket will end up with a 30s read deadline even though it got the pong,
    which will lead to a timeout.
    
    The fix here is processing the pong on pingLoop, synchronizing with the code that 
    sends the ping.
    8f8ef2bc
websocket.go 9.87 KB