From 7775ea325f1abaf4eae0c3a129c18001783428a1 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Wed, 7 Feb 2024 20:50:59 -0800 Subject: [PATCH] close modem socket after joining read thread --- Source/Core/Core/HW/EXI/BBA/TAPServerConnection.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/HW/EXI/BBA/TAPServerConnection.cpp b/Source/Core/Core/HW/EXI/BBA/TAPServerConnection.cpp index 864ef55dae..4cae9255da 100644 --- a/Source/Core/Core/HW/EXI/BBA/TAPServerConnection.cpp +++ b/Source/Core/Core/HW/EXI/BBA/TAPServerConnection.cpp @@ -130,15 +130,15 @@ bool TAPServerConnection::Activate() void TAPServerConnection::Deactivate() { - if (m_fd >= 0) - closesocket(m_fd); - m_fd = -1; - m_read_enabled.Clear(); m_read_shutdown.Set(); if (m_read_thread.joinable()) m_read_thread.join(); m_read_shutdown.Clear(); + + if (m_fd >= 0) + closesocket(m_fd); + m_fd = -1; } bool TAPServerConnection::IsActivated()