From a3bc47d97244b3a30d92baf16f20fddd7131f7cd Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sat, 18 Jun 2022 03:56:30 -0700 Subject: [PATCH] resolve #211 renewAddress() strictly returns a network address, not a bool on timeout --- RF24Mesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RF24Mesh.cpp b/RF24Mesh.cpp index 7e322464..d39b3a95 100644 --- a/RF24Mesh.cpp +++ b/RF24Mesh.cpp @@ -278,7 +278,7 @@ uint16_t RF24Mesh::renewAddress(uint32_t timeout) uint32_t start = millis(); while (!requestAddress(reqCounter)) { - if (millis() - start > timeout) { return 0; } + if (millis() - start > timeout) { break; } uint32_t timeoutInternal = 50 + ((totalReqs + 1) * (reqCounter + 1)) * 2; uint32_t startInternal = millis();