mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
net: also wait for exceptional events in Sock::Wait()
This mimics closely `CConnman::SocketEvents()` and the underlying `poll(2)`.
This commit is contained in:
@@ -150,8 +150,8 @@ bool Session::Accept(Connection& conn)
|
||||
throw std::runtime_error("wait on socket failed");
|
||||
}
|
||||
|
||||
if ((occurred & Sock::RECV) == 0) {
|
||||
// Timeout, no incoming connections within MAX_WAIT_FOR_IO.
|
||||
if (occurred == 0) {
|
||||
// Timeout, no incoming connections or errors within MAX_WAIT_FOR_IO.
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user