Commit 617aee32 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Reduce ping timetout to 45 to 55s.

Thanks to Jeroen van Veen for the debugging.
parent 4b8a509a
......@@ -902,10 +902,13 @@ func clientLoop(c *webClient, ws *websocket.Conn) error {
return errors.New("unexpected action")
}
case <-ticker.C:
if time.Since(readTime) > 90*time.Second {
if time.Since(readTime) > 75*time.Second {
return errors.New("client is dead")
}
if time.Since(readTime) > 60*time.Second {
// Some reverse proxies timeout connexions at 60
// seconds, make sure we generate some activity
// after 55s at most.
if time.Since(readTime) > 45*time.Second {
err := c.write(clientMessage{
Type: "ping",
})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment