Closed emersion closed 2 years ago
We didn't have any data to justify more or less and we made it possible to replace it. Actually, one of my requests was to export the default so it could be overridden at compile time too, eg go build -ldflags -X "github.com/pires/go-proxyproto.DefaultReadHeaderTimeout=10s"
, so you don't need to set it per listener.
I'm fine increasing the default for less experienced consumers of the API to not run into problems early on.
eg
go build -ldflags -X "github.com/pires/go-proxyproto.DefaultReadHeaderTimeout=10s"
As an aside, this doesn't work. -X only works with string vars:
-X importpath.name=value
Set the value of the string variable in importpath named name to value.
This is only effective if the variable is declared in the source code either uninitialized
or initialized to a constant string expression.
TIL thanks a lot @csmith.
200ms is too strict and is causing breakage downstream, especially when TLS is involved. Having a timeout is good, but should not penalize slow connections.
The stdlib is using a 10s timeout for the TLS handshake for instance.
Ref https://github.com/emersion/soju/pull/33