File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 28
28
// If the connection is using the protocol, the RemoteAddr() will return
29
29
// the correct client address. ReadHeaderTimeout will be applied to all
30
30
// connections in order to prevent blocking operations. If no ReadHeaderTimeout
31
- // is set, a default of 200ms will be used. This can be disabled by setting the
31
+ // is set, a default of 10s will be used. This can be disabled by setting the
32
32
// timeout to < 0.
33
33
//
34
34
// Only one of Policy or ConnPolicy should be provided. If both are provided then
Original file line number Diff line number Diff line change @@ -296,8 +296,8 @@ func TestReadHeaderTimeoutIsReset(t *testing.T) {
296
296
}
297
297
298
298
// TestReadHeaderTimeoutIsEmpty ensures the default is set if it is empty.
299
- // Because the default is 200ms and we wait longer than that to send a message,
300
- // we expect the actual address and port to be returned,
299
+ // The default is 10s, but we delay sending a message, so use 200ms in this test.
300
+ // We expect the actual address and port to be returned,
301
301
// rather than the ProxyHeader we defined.
302
302
func TestReadHeaderTimeoutIsEmpty (t * testing.T ) {
303
303
DefaultReadHeaderTimeout = 200 * time .Millisecond
You can’t perform that action at this time.
0 commit comments