File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -764,6 +764,7 @@ static MonoCoopMutex debug_mutex;
764
764
765
765
static void transport_init (void );
766
766
static void transport_connect (const char * address );
767
+ static void transport_close2 (void );
767
768
static gboolean transport_handshake (void );
768
769
static void register_transport (DebuggerTransport * trans );
769
770
@@ -1094,9 +1095,12 @@ mono_debugger_get_generate_debug_info ()
1094
1095
MONO_API void
1095
1096
mono_debugger_disconnect ()
1096
1097
{
1097
- stop_debugger_thread ();
1098
- transport_connect (agent_config .address );
1099
- start_debugger_thread ();
1098
+ // We just need to close the debugger client socket since
1099
+ // the thread is blocked in the RECV method. The debugger_thread
1100
+ // loop already handles the debugger client disconnection properly,
1101
+ // so calling transport_close2 method is enough since the method
1102
+ // only closes the debugger client socket.
1103
+ transport_close2 ();
1100
1104
}
1101
1105
1102
1106
typedef void (* MonoDebuggerAttachFunc )(gboolean attached );
You can’t perform that action at this time.
0 commit comments