diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs index 7e895773bc20e..3e2cf5f33af49 100644 --- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs +++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs @@ -1318,6 +1318,8 @@ class PacketWriter { protected abstract int TransportSend (byte[] buf, int buf_offset, int len); protected abstract void TransportSetTimeouts (int send_timeout, int receive_timeout); protected abstract void TransportClose (); + // Shutdown breaks all communication, resuming blocking waits + protected abstract void TransportShutdown (); internal VersionInfo Version; @@ -1434,6 +1436,7 @@ class PacketWriter { internal void Close () { closed = true; + TransportShutdown (); } internal bool IsClosed { @@ -2865,6 +2868,11 @@ protected override void TransportClose () { socket.Close (); } + + protected override void TransportShutdown () + { + socket.Shutdown (SocketShutdown.Both); + } } /* This is the interface exposed by the debugger towards the debugger agent */