From 4b7dead48367b3c14c607ddba38952d46ee8218e Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sun, 9 Jan 2022 08:04:45 +0100 Subject: [PATCH] #9 Do not block on read for 10 seconds --- APRSHandlerThread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/APRSHandlerThread.cpp b/APRSHandlerThread.cpp index 7b410a3..aab86cb 100644 --- a/APRSHandlerThread.cpp +++ b/APRSHandlerThread.cpp @@ -33,6 +33,7 @@ // #define DUMP_TX const unsigned int APRS_TIMEOUT = 10U; +const unsigned int APRS_READ_TIMEOUT = 1U; CAPRSHandlerThread::CAPRSHandlerThread(const std::string& callsign, const std::string& password, const std::string& address, const std::string& hostname, unsigned int port) : CThread(), @@ -151,7 +152,7 @@ void* CAPRSHandlerThread::Entry() } { std::string line; - int length = m_socket.readLine(line, APRS_TIMEOUT); + int length = m_socket.readLine(line, APRS_READ_TIMEOUT); /*if (length == 0) CLog::logWarning(("No response from the APRS server after %u seconds", APRS_TIMEOUT);*/