Skip to content

Commit

Permalink
#9 Do not block on read for 10 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
F4FXL committed Jan 9, 2022
1 parent 27ce540 commit 4b7dead
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion APRSHandlerThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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);*/
Expand Down

0 comments on commit 4b7dead

Please sign in to comment.