From cc98f8d846fb17b8d29ba97be71a9c7f53fef2a5 Mon Sep 17 00:00:00 2001 From: Simon Ninon Date: Mon, 19 Jun 2017 23:44:21 -0700 Subject: [PATCH] [2.4.3] hotfix - still need to notify in worker thread on socket removal. --- sources/network/unix/io_service.cpp | 2 ++ sources/network/windows/io_service.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sources/network/unix/io_service.cpp b/sources/network/unix/io_service.cpp index 3e74bb6..d4ca165 100644 --- a/sources/network/unix/io_service.cpp +++ b/sources/network/unix/io_service.cpp @@ -161,6 +161,7 @@ io_service::process_rd_event(const fd_t& fd, tracked_socket& socket) { __TACOPIE_LOG(debug, "untrack socket"); m_tracked_sockets.erase(it); m_wait_for_removal_condvar.notify_all(); + m_notifier.notify(); } }; } @@ -189,6 +190,7 @@ io_service::process_wr_event(const fd_t& fd, tracked_socket& socket) { __TACOPIE_LOG(debug, "untrack socket"); m_tracked_sockets.erase(it); m_wait_for_removal_condvar.notify_all(); + m_notifier.notify(); } }; } diff --git a/sources/network/windows/io_service.cpp b/sources/network/windows/io_service.cpp index 760eb48..929d5b3 100644 --- a/sources/network/windows/io_service.cpp +++ b/sources/network/windows/io_service.cpp @@ -134,6 +134,7 @@ io_service::process_events(void) { __TACOPIE_LOG(debug, "untrack socket"); m_tracked_sockets.erase(it); m_wait_for_removal_condvar.notify_all(); + m_notifier.notify(); } } } @@ -162,6 +163,7 @@ io_service::process_rd_event(const fd_t& fd, tracked_socket& socket) { __TACOPIE_LOG(debug, "untrack socket"); m_tracked_sockets.erase(it); m_wait_for_removal_condvar.notify_all(); + m_notifier.notify(); } }; }