Don't recreate the GDB server socket
This commit is contained in:
parent
917a292256
commit
fc361f82a7
1 changed files with 5 additions and 17 deletions
|
@ -593,14 +593,12 @@ namespace Ryujinx.HLE.Debugger
|
||||||
|
|
||||||
private void SocketReaderThreadMain()
|
private void SocketReaderThreadMain()
|
||||||
{
|
{
|
||||||
restartListen:
|
var endpoint = new IPEndPoint(IPAddress.Any, GdbStubPort);
|
||||||
try
|
ListenerSocket = new TcpListener(endpoint);
|
||||||
{
|
ListenerSocket.Start();
|
||||||
var endpoint = new IPEndPoint(IPAddress.Any, GdbStubPort);
|
Logger.Notice.Print(LogClass.GdbStub, $"Currently waiting on {endpoint} for GDB client");
|
||||||
ListenerSocket = new TcpListener(endpoint);
|
|
||||||
ListenerSocket.Start();
|
|
||||||
Logger.Notice.Print(LogClass.GdbStub, $"Currently waiting on {endpoint} for GDB client");
|
|
||||||
|
|
||||||
|
while (true) {
|
||||||
ClientSocket = ListenerSocket.AcceptSocket();
|
ClientSocket = ListenerSocket.AcceptSocket();
|
||||||
ClientSocket.NoDelay = true;
|
ClientSocket.NoDelay = true;
|
||||||
ReadStream = new NetworkStream(ClientSocket, System.IO.FileAccess.Read);
|
ReadStream = new NetworkStream(ClientSocket, System.IO.FileAccess.Read);
|
||||||
|
@ -649,16 +647,6 @@ namespace Ryujinx.HLE.Debugger
|
||||||
|
|
||||||
eof:
|
eof:
|
||||||
Logger.Notice.Print(LogClass.GdbStub, "GDB client lost connection");
|
Logger.Notice.Print(LogClass.GdbStub, "GDB client lost connection");
|
||||||
goto restartListen;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Logger.Error?.Print(LogClass.GdbStub, ex.ToString());
|
|
||||||
Logger.Notice.Print(LogClass.GdbStub, "GDB stub socket closed");
|
|
||||||
if (!_shuttingDown)
|
|
||||||
{
|
|
||||||
goto restartListen;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue