1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-27 21:05:53 +00:00

Revert "send const ping payload"

This reverts commit 26cddf5271.
This commit is contained in:
Kane York 2017-11-13 13:40:35 -08:00
parent 2c1cd94013
commit 6e6a5d7836

View file

@ -495,8 +495,6 @@ func runSocketReader(conn *websocket.Conn, client *ClientInfo, errorChan chan<-
// exit goroutine
}
var pingPayload = []byte("PING")
func runSocketWriter(conn *websocket.Conn, client *ClientInfo, errorChan <-chan error, clientChan <-chan ClientMessage, serverMessageChan <-chan ClientMessage) websocket.CloseError {
lastPacket := time.Now()
@ -526,7 +524,7 @@ func runSocketWriter(conn *websocket.Conn, client *ClientInfo, errorChan <-chan
}
conn.WriteControl(
websocket.PingMessage,
pingPayload,
[]byte(strconv.FormatInt(time.Now().Unix(), 10)),
getDeadline(),
)
continue
@ -539,7 +537,7 @@ func runSocketWriter(conn *websocket.Conn, client *ClientInfo, errorChan <-chan
if msg.Command == "__ping" {
// generated for PONG packets
// want to branch AFTER lastPacket is set
// want this to run AFTER lastPacket was set
continue
}