Skip to content

Commit 2a96cbc

Browse files
authored
Merge pull request #550 from fabik111/fix-for-cellular-connectivity
Fix the crash of Portenta H7 with cellular connectivity
2 parents 52a24d6 + 4e7860d commit 2a96cbc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ArduinoIoTCloudTCP.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ void ArduinoIoTCloudTCP::update()
244244
* the mqttClient. The state can be reached only after the mqttClient is connected to
245245
* the broker.
246246
*/
247-
if(_state <= State::Init){
247+
if(_state <= State::ConnectPhy){
248248
return;
249249
}
250250

@@ -264,7 +264,7 @@ void ArduinoIoTCloudTCP::update()
264264

265265
int ArduinoIoTCloudTCP::connected()
266266
{
267-
if (_state <= State::Init) {
267+
if (_state <= State::ConnectPhy) {
268268
return 0;
269269
}
270270
return _mqttClient.connected();
@@ -281,7 +281,7 @@ void ArduinoIoTCloudTCP::printDebugInfo()
281281
}
282282

283283
void ArduinoIoTCloudTCP::disconnect() {
284-
if (_state == State::ConfigPhy || _state == State::Init) {
284+
if (_state <= State::ConnectPhy) {
285285
return;
286286
}
287287

0 commit comments

Comments
 (0)