diff --git a/asio/include/asio/detail/select_reactor.hpp b/asio/include/asio/detail/select_reactor.hpp index a2cee7d9..9a75d5b8 100644 --- a/asio/include/asio/detail/select_reactor.hpp +++ b/asio/include/asio/detail/select_reactor.hpp @@ -191,7 +191,7 @@ private: except_op_queue_.dispatch_cancellations(); bool stop = false; - while (!stop) + while (!stop && !stop_thread_) { // Set up the descriptor sets. fd_set_adapter read_fds;