diff --git a/protocol.go b/protocol.go index 270b90d..93cf7c4 100644 --- a/protocol.go +++ b/protocol.go @@ -28,7 +28,7 @@ var ( // If the connection is using the protocol, the RemoteAddr() will return // the correct client address. ReadHeaderTimeout will be applied to all // connections in order to prevent blocking operations. If no ReadHeaderTimeout -// is set, a default of 200ms will be used. This can be disabled by setting the +// is set, a default of 10s will be used. This can be disabled by setting the // timeout to < 0. // // Only one of Policy or ConnPolicy should be provided. If both are provided then diff --git a/protocol_test.go b/protocol_test.go index 4221149..2928373 100644 --- a/protocol_test.go +++ b/protocol_test.go @@ -296,8 +296,8 @@ func TestReadHeaderTimeoutIsReset(t *testing.T) { } // TestReadHeaderTimeoutIsEmpty ensures the default is set if it is empty. -// Because the default is 200ms and we wait longer than that to send a message, -// we expect the actual address and port to be returned, +// The default is 10s, but we delay sending a message, so use 200ms in this test. +// We expect the actual address and port to be returned, // rather than the ProxyHeader we defined. func TestReadHeaderTimeoutIsEmpty(t *testing.T) { DefaultReadHeaderTimeout = 200 * time.Millisecond