Revert "bugfix: variable name shadowing"
This reverts commit a6dc9699d2
.
This commit is contained in:
parent
0159236011
commit
d2eea40641
1 changed files with 4 additions and 4 deletions
|
@ -103,7 +103,7 @@ void connect_wifi() {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
void connect_mqtt() {
|
void connect_mqtt() {
|
||||||
int backoff_delay = 1000;
|
int delay = 1000;
|
||||||
while(true) {
|
while(true) {
|
||||||
Serial.print("MQTT: ");
|
Serial.print("MQTT: ");
|
||||||
mqtt = PubSubClient();
|
mqtt = PubSubClient();
|
||||||
|
@ -142,9 +142,9 @@ void connect_mqtt() {
|
||||||
int error_code = mqtt.state();
|
int error_code = mqtt.state();
|
||||||
Serial.println("failed, error code "+String(error_code));
|
Serial.println("failed, error code "+String(error_code));
|
||||||
|
|
||||||
delay(backoff_delay);
|
delay(delay);
|
||||||
backoff_delay += 1000;
|
delay += 1000;
|
||||||
if(backoff_delay > 60 * 1000) backoff_delay = 60 * 1000;
|
if(delay > 60 * 1000) delay = 60 * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
Serial.println("ok");
|
Serial.println("ok");
|
||||||
|
|
Loading…
Reference in a new issue