mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45:58 +01:00
Reduce ping timetout to 45 to 55s.
Thanks to Jeroen van Veen for the debugging.
This commit is contained in:
parent
4b8a509a21
commit
617aee325f
1 changed files with 5 additions and 2 deletions
|
@ -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",
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue