From 5056872688f6a143874a1240622660a174c27a73 Mon Sep 17 00:00:00 2001 From: tftzee <49162693+rex-schilasky@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:40:35 +0200 Subject: [PATCH] remove callbacks before stopping tcp protocol layer --- ecal/core/src/service/ecal_service_server_impl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ecal/core/src/service/ecal_service_server_impl.cpp b/ecal/core/src/service/ecal_service_server_impl.cpp index 10d2ff6450..10cfc3ecf4 100644 --- a/ecal/core/src/service/ecal_service_server_impl.cpp +++ b/ecal/core/src/service/ecal_service_server_impl.cpp @@ -135,12 +135,6 @@ namespace eCAL { if (!m_created) return(false); - if (m_tcp_server_v0) - m_tcp_server_v0->stop(); - - if (m_tcp_server_v1) - m_tcp_server_v1->stop(); - // reset method callback map { std::lock_guard const lock(m_method_map_sync); @@ -153,6 +147,12 @@ namespace eCAL m_event_callback_map.clear(); } + if (m_tcp_server_v0) + m_tcp_server_v0->stop(); + + if (m_tcp_server_v1) + m_tcp_server_v1->stop(); + // mark as no more created m_created = false;