From fbd82cc96681398d0fd59bc6732e621659aa94ba Mon Sep 17 00:00:00 2001 From: Viacheslav Kalenikov Date: Mon, 29 Jun 2026 15:34:11 +0200 Subject: [PATCH] Stops boost::asio::io_context processing thread before _server.close() call. server::on_connection_disconnected mutates _clients on the asio io thread while server::close() clears the same unguarded std::list on the main thread (WsStreamingServer::onStopServer calls close() before stopping/joining the io thread) --- .../libraries/websocket_streaming/src/ws_streaming_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/libraries/websocket_streaming/src/ws_streaming_server.cpp b/shared/libraries/websocket_streaming/src/ws_streaming_server.cpp index faabec4..109fbf6 100644 --- a/shared/libraries/websocket_streaming/src/ws_streaming_server.cpp +++ b/shared/libraries/websocket_streaming/src/ws_streaming_server.cpp @@ -156,9 +156,9 @@ void WsStreamingServer::onStopServer() // openDAQ can (but probably should not) call onStopServer() more than once. if (_thread.joinable()) { - _server.close(); _ioc.stop(); _thread.join(); + _server.close(); } }