Skip to content

Commit a39b4c0

Browse files
committed
decrement attempts, increase max for MQTT!
1 parent 8a989a0 commit a39b4c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Wippersnapper.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ void Wippersnapper::runNetFSM() {
939939
// WS_DEBUG_PRINTLN("FSM_NET_ESTABLISH_MQTT");
940940
WS._mqtt->setKeepAliveInterval(WS_KEEPALIVE_INTERVAL);
941941
// Attempt to connect
942-
maxAttempts = 2;
942+
maxAttempts = 10;
943943
while (maxAttempts >= 0) {
944944
setStatusLEDColor(LED_IO_CONNECT);
945945
mqttRC = WS._mqtt->connect(WS._username, WS._key);
@@ -948,7 +948,8 @@ void Wippersnapper::runNetFSM() {
948948
break;
949949
}
950950
setStatusLEDColor(BLACK);
951-
delay(500);
951+
delay(1000);
952+
maxAttempts--;
952953
}
953954
if (fsmNetwork == FSM_NET_CHECK_MQTT) {
954955
break;

0 commit comments

Comments
 (0)