Imported Upstream version 6.6.0.114

Former-commit-id: 48b5c9fe44a9601c58e1ebb3fff2b1a50e94a508
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-10-07 08:58:42 +00:00
parent f3eef79423
commit 5ee9b766e6
48 changed files with 56 additions and 44 deletions

View File

@@ -1318,6 +1318,8 @@ namespace Mono.Debugger.Soft
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 @@ namespace Mono.Debugger.Soft
internal void Close () {
closed = true;
TransportShutdown ();
}
internal bool IsClosed {
@@ -2865,6 +2868,11 @@ namespace Mono.Debugger.Soft
{
socket.Close ();
}
protected override void TransportShutdown ()
{
socket.Shutdown (SocketShutdown.Both);
}
}
/* This is the interface exposed by the debugger towards the debugger agent */

View File

@@ -150,8 +150,11 @@ namespace Mono.Debugger.Soft
}
public void Detach () {
conn.Close ();
// Notify the application that we are detaching
conn.VM_Dispose ();
// Close the connection. No further messages can be sent
// over the connection after this point.
conn.Close ();
notify_vm_event (EventType.VMDisconnect, SuspendPolicy.None, 0, 0, null, 0);
}