Commit ee18b602 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Reduce server-side timeout.

parent 7151fad1
...@@ -1007,13 +1007,12 @@ func clientLoop(c *webClient, ws *websocket.Conn, versionError bool) error { ...@@ -1007,13 +1007,12 @@ func clientLoop(c *webClient, ws *websocket.Conn, versionError bool) error {
} }
} }
case <-ticker.C: case <-ticker.C:
if time.Since(readTime) > 75*time.Second { if time.Since(readTime) > 45*time.Second {
return errors.New("client is dead") return errors.New("client is dead")
} }
// Some reverse proxies timeout connexions at 60 // Some reverse proxies timeout connexions at 60
// seconds, make sure we generate some activity // seconds, make sure we generate some activity
// after 55s at most. if time.Since(readTime) > 20*time.Second {
if time.Since(readTime) > 45*time.Second {
err := c.write(clientMessage{ err := c.write(clientMessage{
Type: "ping", 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