Add optional timeout to get PROXY header
The library user can define a maximum time to wait for the PROXY protocol header, before failing out to normal connection. We can assume that a proxy in front of the service will send the PROXY header immediatelly. This solves the issue of clients getting block when getting the RemoteAddr() for an incoming connection that does not send any data. That is the case of http.Serve on go < 1.6 as described in https://github.com/armon/go-proxyproto/issues/1
This commit is contained in:
Reference in New Issue
Block a user