From: Rolf Bjarne Kvinge Date: Fri, 20 Nov 2015 15:56:06 +0000 (+0100) Subject: [System] Don't throw SocketExceptions when we're stopping. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;ds=sidebyside;h=b5d5920a4a8f4ce36c953f55967d7cb20145bcdf;p=mono.git [System] Don't throw SocketExceptions when we're stopping. --- diff --git a/mcs/class/System/Test/System.Net/SocketResponder.cs b/mcs/class/System/Test/System.Net/SocketResponder.cs index daa183afa06..213f0b72d3f 100644 --- a/mcs/class/System/Test/System.Net/SocketResponder.cs +++ b/mcs/class/System/Test/System.Net/SocketResponder.cs @@ -131,7 +131,7 @@ namespace MonoTests.System.Net } } catch (SocketException ex) { // ignore interruption of blocking call - if (ex.ErrorCode != SOCKET_CLOSED && ex.ErrorCode != SOCKET_INVALID_ARGS) + if (ex.ErrorCode != SOCKET_CLOSED && ex.ErrorCode != SOCKET_INVALID_ARGS && _state != STATE_STOPPED) throw; } catch (ObjectDisposedException ex) { Console.WriteLine (ex);