aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 43d8cab..c47ea63 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -295,7 +295,7 @@ class Main : public EdiDecoder::ETIDataCollector {
const size_t bufsize = 32;
std::vector<uint8_t> buf(bufsize);
try {
- ret = sock.recv(buf.data(), buf.size(), 0);
+ ret = sock.recv(buf.data(), buf.size(), 0, 8000);
if (ret > 0) {
buf.resize(ret);
std::vector<uint8_t> frame;
@@ -304,6 +304,9 @@ class Main : public EdiDecoder::ETIDataCollector {
}
catch (const Socket::TCPSocket::Interrupted&) {
}
+ catch (const Socket::TCPSocket::Timeout&) {
+ ret = 0;
+ }
} while (running and ret > 0);
}