You've already forked Adafruit_MQTT_Library
							
							
				mirror of
				https://github.com/adafruit/Adafruit_MQTT_Library.git
				synced 2025-11-03 11:53:11 +03:00 
			
		
		
		
	only kick watchdog if its enabled
This commit is contained in:
		@@ -50,7 +50,9 @@ class Adafruit_MQTT_FONA : public Adafruit_MQTT {
 | 
				
			|||||||
  bool connectServer() {
 | 
					  bool connectServer() {
 | 
				
			||||||
    char server[40];
 | 
					    char server[40];
 | 
				
			||||||
    strncpy_P(server, servername, 40);
 | 
					    strncpy_P(server, servername, 40);
 | 
				
			||||||
 | 
					#ifdef ADAFRUIT_SLEEPYDOG_H
 | 
				
			||||||
    Watchdog.reset();
 | 
					    Watchdog.reset();
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // connect to server
 | 
					    // connect to server
 | 
				
			||||||
    DEBUG_PRINTLN(F("Connecting to TCP"));
 | 
					    DEBUG_PRINTLN(F("Connecting to TCP"));
 | 
				
			||||||
@@ -116,7 +118,9 @@ class Adafruit_MQTT_FONA : public Adafruit_MQTT {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					#ifdef ADAFRUIT_SLEEPYDOG_H
 | 
				
			||||||
      Watchdog.reset();
 | 
					      Watchdog.reset();
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
      timeout -= MQTT_FONA_INTERAVAILDELAY;
 | 
					      timeout -= MQTT_FONA_INTERAVAILDELAY;
 | 
				
			||||||
      timeout -= MQTT_FONA_QUERYDELAY; // this is how long it takes to query the FONA for avail()
 | 
					      timeout -= MQTT_FONA_QUERYDELAY; // this is how long it takes to query the FONA for avail()
 | 
				
			||||||
      delay(MQTT_FONA_INTERAVAILDELAY);
 | 
					      delay(MQTT_FONA_INTERAVAILDELAY);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user