aboutsummaryrefslogtreecommitdiff
path: root/src/i2p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/i2p.cpp')
-rw-r--r--src/i2p.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/i2p.cpp b/src/i2p.cpp
index a44f09f043..2ae164633b 100644
--- a/src/i2p.cpp
+++ b/src/i2p.cpp
@@ -147,7 +147,9 @@ bool Session::Accept(Connection& conn)
try {
while (!*m_interrupt) {
Sock::Event occurred;
- conn.sock->Wait(MAX_WAIT_FOR_IO, Sock::RECV, &occurred);
+ if (!conn.sock->Wait(MAX_WAIT_FOR_IO, Sock::RECV, &occurred)) {
+ throw std::runtime_error("wait on socket failed");
+ }
if ((occurred & Sock::RECV) == 0) {
// Timeout, no incoming connections within MAX_WAIT_FOR_IO.