diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2014-05-17 07:19:27 +0000 |
---|---|---|
committer | Yawning Angel <yawning@schwanenlied.me> | 2014-05-17 07:19:27 +0000 |
commit | 745d414645872853fe1e3adab28dfb02f0b61dd0 (patch) | |
tree | ce57acc315d5023867b9c0feff623ef1bbff10fe | |
parent | a60f92cf95ecee84702b5998851a7dca127291c0 (diff) |
Change the client connection timeout to 30 sec.
This is more common than 15 seconds (It's what Firefox uses for the
request timeout).
-rw-r--r-- | obfs4.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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() } |