From ae0f2e9321b5d9930a9b7753cb4540e53307ba8d Mon Sep 17 00:00:00 2001 From: Simon Ninon Date: Sun, 2 Jul 2017 12:20:56 -0700 Subject: [PATCH] [2.4.4] fix #17 and cpp_redis#85 (select keep sleeping and does not process incoming read/write events). --- sources/network/unix/io_service.cpp | 6 ++++-- sources/network/windows/io_service.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sources/network/unix/io_service.cpp b/sources/network/unix/io_service.cpp index d4ca165..f6385d9 100644 --- a/sources/network/unix/io_service.cpp +++ b/sources/network/unix/io_service.cpp @@ -161,8 +161,9 @@ 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(); } + + m_notifier.notify(); }; } @@ -190,8 +191,9 @@ 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(); } + + m_notifier.notify(); }; } diff --git a/sources/network/windows/io_service.cpp b/sources/network/windows/io_service.cpp index a6115b8..5765f73 100644 --- a/sources/network/windows/io_service.cpp +++ b/sources/network/windows/io_service.cpp @@ -162,8 +162,9 @@ 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(); } + + m_notifier.notify(); }; } @@ -191,8 +192,9 @@ 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(); } + + m_notifier.notify(); }; }