mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-28 05:15:54 +00:00
reject pongs for non-set-up clients
This commit is contained in:
parent
d254435173
commit
fd357ae6f2
1 changed files with 3 additions and 1 deletions
|
@ -336,7 +336,9 @@ func RunSocketConnection(conn *websocket.Conn) {
|
||||||
|
|
||||||
conn.SetPongHandler(func(pongBody string) error {
|
conn.SetPongHandler(func(pongBody string) error {
|
||||||
client.Mutex.Lock()
|
client.Mutex.Lock()
|
||||||
|
if client.HelloOK { // do not accept PONGs until hello sent
|
||||||
client.pingCount = 0
|
client.pingCount = 0
|
||||||
|
}
|
||||||
client.Mutex.Unlock()
|
client.Mutex.Unlock()
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue