diff --git a/src/TheThingsNetwork.cpp b/src/TheThingsNetwork.cpp
index 8ae3933d..e06b7934 100644
--- a/src/TheThingsNetwork.cpp
+++ b/src/TheThingsNetwork.cpp
@@ -364,7 +364,7 @@ size_t TheThingsNetwork::readLine(char *buffer, size_t size, uint8_t attempts)
   {
     read = modemStream->readBytesUntil('\n', buffer, size);
   }
-  if (attempts<=0)
+  if (!read)
   { // If attempts is activated return 0 and set RN state marker
     this->needsHardReset = true; // Inform the application about the radio module is not responsive.
     debugPrintLn("No response from RN module.");