From b06fceffa4349fdb8d948b20fc20087cbb2d8e7b Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 6 Jul 2024 21:37:01 +1000 Subject: [PATCH] GDB/PINE: Fix listen socket leak on shutdown --- src/core/gdb_server.cpp | 1 + src/core/pine_server.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/core/gdb_server.cpp b/src/core/gdb_server.cpp index 50dbf3e73..aebbfe3ba 100644 --- a/src/core/gdb_server.cpp +++ b/src/core/gdb_server.cpp @@ -547,6 +547,7 @@ void GDBServer::Shutdown() } INFO_LOG("Stopping GDB server."); + s_gdb_listen_socket->Close(); s_gdb_listen_socket.reset(); System::ReleaseSocketMultiplexer(); } diff --git a/src/core/pine_server.cpp b/src/core/pine_server.cpp index 569095c41..1112ef839 100644 --- a/src/core/pine_server.cpp +++ b/src/core/pine_server.cpp @@ -178,6 +178,7 @@ void PINEServer::Shutdown() // also closes the listener if (s_listen_socket) { + s_listen_socket->Close(); s_listen_socket.reset(); System::ReleaseSocketMultiplexer(); }