mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-21 04:32:09 +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
|
#ifdef ESP8266
|
||||||
bool MqttClient::connect(String id) {
|
bool MqttClient::connect(String id) {
|
||||||
|
if (isBegin == false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (this->uri.isEmpty()) {
|
if (this->uri.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -264,6 +268,9 @@ bool MqttClient::connect(String id) {
|
|||||||
return CLIENT()->connect(id.c_str(), user.c_str(), password.c_str());
|
return CLIENT()->connect(id.c_str(), user.c_str(), password.c_str());
|
||||||
}
|
}
|
||||||
void MqttClient::handle(void) {
|
void MqttClient::handle(void) {
|
||||||
|
if (isBegin == false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
CLIENT()->loop();
|
CLIENT()->loop();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user