aboutsummaryrefslogtreecommitdiff
path: root/src/i2p.cpp
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2021-05-04 12:06:44 +0200
committerVasil Dimov <vd@FreeBSD.org>2022-06-09 13:34:27 +0200
commitcc74459768063a923fb6220a4f420eaf211aee7b (patch)
treed0d044422b29af67de3f064963024210f66c89d5 /src/i2p.cpp
parente18fd4763e77d1e19208effa9f1a08c5b29fea8e (diff)
net: also wait for exceptional events in Sock::Wait()
This mimics closely `CConnman::SocketEvents()` and the underlying `poll(2)`.
Diffstat (limited to 'src/i2p.cpp')
-rw-r--r--src/i2p.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/i2p.cpp b/src/i2p.cpp
index e08b5461fe..1ebc1052b1 100644
--- a/src/i2p.cpp
+++ b/src/i2p.cpp
@@ -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;
}