From 4c7207db818db67d1c13bf25b7123dc0ff8063ac Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Tue, 8 Apr 2025 18:09:21 +0200 Subject: [PATCH] LibIPC: Join send thread instead of detaching in `~ConnectionBase()` By doing this we ensure that sending thread won't try to write into a closed socket. --- Libraries/LibIPC/Connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibIPC/Connection.cpp b/Libraries/LibIPC/Connection.cpp index b2811e34412..0b31709cde8 100644 --- a/Libraries/LibIPC/Connection.cpp +++ b/Libraries/LibIPC/Connection.cpp @@ -69,7 +69,7 @@ ConnectionBase::~ConnectionBase() m_send_queue->running = false; m_send_queue->condition.signal(); } - m_send_thread->detach(); + (void)m_send_thread->join(); } bool ConnectionBase::is_open() const