HyperFastCgi icon indicating copy to clipboard operation
HyperFastCgi copied to clipboard

Managed Listener leaks sockets

Open alexjfisher opened this issue 4 years ago • 0 comments

Hi

I've not had much luck getting the native listener to be stable, so have been trying the managed listener instead. Unfortunately, this leaks sockets. After a while, I have so many sockets in CLOSE_WAIT state that I run out of file descriptors.

I've been trying to debug this, but haven't got that far. Could the problem be here? https://github.com/xplicit/HyperFastCgi/blob/2816c2205ce94416ae094326c33521e9094f9799/src/HyperFastCgi/Listeners/FastCgiNetworkConnector.cs#L191

readShutdown is set, but there's no code anywhere else that ever checks this. (If I trigger a leak by eg. shutting down nginx, this callback does get called and bytesRead == 0)

Maybe I should just call OnDisconnected (); instead??

Thanks

alexjfisher avatar Aug 16 '19 12:08 alexjfisher