mirror of
https://github.com/jech/galene.git
synced 2024-11-09 18:25:58 +01:00
Reduce server-side timeout.
This commit is contained in:
parent
7151fad149
commit
ee18b60226
1 changed files with 2 additions and 3 deletions
|
@ -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",
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue