Not sure why it happens though, but it led to all sorts of strange intermittent issues with broken connections.
Once I replaced this logic with passing files using GetFile().Fd() instead it started working fine, so beware of this. I still wonder why it happens though.
Comments
I found that it corrupts the FD by using this call:
https://github.com/rcrowley/goagain/blob/master/goagain.go#L...
Not sure why it happens though, but it led to all sorts of strange intermittent issues with broken connections.
Once I replaced this logic with passing files using GetFile().Fd() instead it started working fine, so beware of this. I still wonder why it happens though.
Thanks for this.
Were you able to publish your changes either on a fork or in a PR?
I ended up using different library:
https://github.com/gwatts/manners
But the code that extracts the fd without using reflection and access to the private properties is here:
https://github.com/mailgun/manners/blob/master/listener.go#L...
I think it should be fairly easy to port it to Richard's implementation