fix: Potential hang when closing UDP Servers after a client connected

This commit is contained in:
WerWolv
2025-07-07 00:00:21 +02:00
parent f589d898ac
commit 42256a5c2f

View File

@@ -28,7 +28,6 @@ namespace hex {
void UDPServer::stop() {
m_running = false;
if (m_thread.joinable()) m_thread.join();
if (m_socketFd >= 0) {
#if defined(OS_WINDOWS)
@@ -37,6 +36,8 @@ namespace hex {
::close(m_socketFd);
#endif
}
if (m_thread.joinable()) m_thread.join();
}
void UDPServer::run() {