Skip to content
Snippets Groups Projects
Commit 745d4146 authored by Yawning Angel's avatar Yawning Angel
Browse files

Change the client connection timeout to 30 sec.

This is more common than 15 seconds (It's what Firefox uses for the
request timeout).
parent a60f92cf
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ import (
const (
headerLength = framing.FrameOverhead + packetOverhead
connectionTimeout = time.Duration(15) * time.Second
connectionTimeout = time.Duration(30) * time.Second
minCloseThreshold = 0
maxCloseThreshold = framing.MaximumSegmentLength * 5
......@@ -324,6 +324,9 @@ func (c *Obfs4Conn) ServerHandshake() error {
err := c.serverHandshake(c.listener.nodeID, c.listener.keyPair)
c.listener = nil
if err != nil {
// XXX: Maybe make the timeout period deterministic, since random
// hangup intervals are also suspicious. An ok value would be someting
// like the Nginx client_header_timeout (60s).
c.closeAfterDelay()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment