Browse Source

Increase meek roundtrip timeout from 5 seconds to 20 seconds (to match Android Java implementation)

Rod Hynes 10 years ago
parent
commit
cf7b7e8c3d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      psiphon/meekConn.go

+ 2 - 1
psiphon/meekConn.go

@@ -54,6 +54,7 @@ const (
 	POLL_INTERNAL_MULTIPLIER       = 1.5
 	MEEK_ROUND_TRIP_RETRY_DEADLINE = 1 * time.Second
 	MEEK_ROUND_TRIP_RETRY_DELAY    = 50 * time.Millisecond
+	MEEK_ROUND_TRIP_TIMEOUT        = 20 * time.Second
 )
 
 // MeekConn is a network connection that tunnels TCP over HTTP and supports "fronting". Meek sends
@@ -193,7 +194,7 @@ func DialMeek(
 	transport := &http.Transport{
 		Proxy: proxyUrl,
 		Dial:  dialer,
-		ResponseHeaderTimeout: TUNNEL_WRITE_TIMEOUT,
+		ResponseHeaderTimeout: MEEK_ROUND_TRIP_TIMEOUT,
 	}
 
 	// The main loop of a MeekConn is run in the relay() goroutine.