Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ignore exception closing socket

	Ignore exception closing socket and let the rest of the cleanup take
	place.

	Patch from Tiaan Geldenhuys.
  • Loading branch information...
commit b241882c3221e26e0c6a799003bceb17cc9a894e 1 parent ce8ecf1
@gonzalop gonzalop authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/Mono.WebServer.FastCgi/Connection.cs
View
9 src/Mono.WebServer.FastCgi/Connection.cs
@@ -328,7 +328,14 @@ public void Run ()
while (!stop && (UnfinishedRequests || keep_alive));
if (requests.Count == 0) {
- socket.Close ();
+ try {
+ socket.Close ();
+ } catch (System.Net.Sockets.SocketException e) {
+ // Ignore: "The descriptor is not a socket"
+ // error from UnmanagedSocket.Close
+ if (e.ErrorCode != 10038)
+ throw; // Rethrow other errors
+ }
server.EndConnection (this);
server.ReleaseBuffers (receive_buffer,
send_buffer);
Please sign in to comment.
Something went wrong with that request. Please try again.