When heavily loading the FastCGI server resulting in connections hanging up gracefully on the remote end, the Sockets.Socket behavior is to immediately return 0 from calls to Receive. This behavior was not handled, resulting in CPU usage spinning out of control and the FastCGI server becoming partly or completely unavailable, depending on the number of threads and threads affected by the problem.
This fix is a patch that solves this problem under a few assumptions as documented in the commit. A more fit exception is probably required.
Fix for data errors