Skip to content

Commit 65011fe

Browse files
committed
Fixing potential infinite loop
1 parent aab76ad commit 65011fe

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Components/Modbus/ModbusRTU.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ bool ModbusRTU::ReadRegisters(uint16_t startAddress, uint8_t numValues, uint8_t
7777
delay(Constants::ModbusRTU::RetryDelayMs);
7878
}
7979
}
80+
81+
numTries--;
8082
}
8183

8284
// All read attempts failed

0 commit comments

Comments
 (0)