Skip to content

Commit 8b456cd

Browse files
committed
add error code to TimeoutException, where available
1 parent 612f149 commit 8b456cd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Net/src/SocketImpl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ int SocketImpl::receiveBytes(void* buffer, int length, int flags)
324324
if (err == POCO_EAGAIN && !_blocking)
325325
;
326326
else if (err == POCO_EAGAIN || err == POCO_ETIMEDOUT)
327-
throw TimeoutException();
327+
throw TimeoutException(err);
328328
else
329329
error(err);
330330
}
@@ -380,7 +380,7 @@ int SocketImpl::receiveFrom(void* buffer, int length, SocketAddress& address, in
380380
if (err == POCO_EAGAIN && !_blocking)
381381
;
382382
else if (err == POCO_EAGAIN || err == POCO_ETIMEDOUT)
383-
throw TimeoutException();
383+
throw TimeoutException(err);
384384
else
385385
error(err);
386386
}

0 commit comments

Comments
 (0)