diff --git a/src/net.cpp b/src/net.cpp index a9b43f1175..9a49b275f5 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1448,7 +1448,12 @@ void CConnman::SocketEvents(std::set &recv_set, std::set &send_s vpollfds.push_back(std::move(it.second)); } - if (poll(vpollfds.data(), vpollfds.size(), SELECT_TIMEOUT_MILLISECONDS) < 0) return; + wakeupSelectNeeded = true; + int r = poll(vpollfds.data(), vpollfds.size(), SELECT_TIMEOUT_MILLISECONDS); + wakeupSelectNeeded = false; + if (r < 0) { + return; + } if (interruptNet) return;