Skip to content

Commit 9f4b4fb

Browse files
committed
Fix failed attempts condition
1 parent 3164696 commit 9f4b4fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TheThingsNetwork.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ size_t TheThingsNetwork::readLine(char *buffer, size_t size, uint8_t attempts)
364364
{
365365
read = modemStream->readBytesUntil('\n', buffer, size);
366366
}
367-
if (attempts<=0)
367+
if (!read)
368368
{ // If attempts is activated return 0 and set RN state marker
369369
this->needsHardReset = true; // Inform the application about the radio module is not responsive.
370370
debugPrintLn("No response from RN module.");

0 commit comments

Comments
 (0)