diff --git a/socketserver/server/handlecore.go b/socketserver/server/handlecore.go index 7824b05c..9cac001c 100644 --- a/socketserver/server/handlecore.go +++ b/socketserver/server/handlecore.go @@ -336,7 +336,9 @@ func RunSocketConnection(conn *websocket.Conn) { conn.SetPongHandler(func(pongBody string) error { client.Mutex.Lock() - client.pingCount = 0 + if client.HelloOK { // do not accept PONGs until hello sent + client.pingCount = 0 + } client.Mutex.Unlock() return nil })