mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-20 20:22:08 +02:00
[Fix] PCB 4.3: Boot loop if not connected to Dashboard, #186
This commit is contained in:
@ -249,6 +249,10 @@ int MqttClient::getConnectionFailedCount(void) { return connectionFailedCount; }
|
||||
|
||||
#ifdef ESP8266
|
||||
bool MqttClient::connect(String id) {
|
||||
if (isBegin == false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this->uri.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
@ -264,6 +268,9 @@ bool MqttClient::connect(String id) {
|
||||
return CLIENT()->connect(id.c_str(), user.c_str(), password.c_str());
|
||||
}
|
||||
void MqttClient::handle(void) {
|
||||
if (isBegin == false) {
|
||||
return;
|
||||
}
|
||||
CLIENT()->loop();
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user