From 4e7860de3208fcaec01db4e6600bc31e79af6a8e Mon Sep 17 00:00:00 2001 From: fabik111 Date: Mon, 26 May 2025 17:59:30 +0200 Subject: [PATCH] fix the crash of portenta h7 with cellular connectivity --- src/ArduinoIoTCloudTCP.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ArduinoIoTCloudTCP.cpp b/src/ArduinoIoTCloudTCP.cpp index f39e6ce9..9de9d301 100644 --- a/src/ArduinoIoTCloudTCP.cpp +++ b/src/ArduinoIoTCloudTCP.cpp @@ -244,7 +244,7 @@ void ArduinoIoTCloudTCP::update() * the mqttClient. The state can be reached only after the mqttClient is connected to * the broker. */ - if(_state <= State::Init){ + if(_state <= State::ConnectPhy){ return; } @@ -264,7 +264,7 @@ void ArduinoIoTCloudTCP::update() int ArduinoIoTCloudTCP::connected() { - if (_state <= State::Init) { + if (_state <= State::ConnectPhy) { return 0; } return _mqttClient.connected(); @@ -281,7 +281,7 @@ void ArduinoIoTCloudTCP::printDebugInfo() } void ArduinoIoTCloudTCP::disconnect() { - if (_state == State::ConfigPhy || _state == State::Init) { + if (_state <= State::ConnectPhy) { return; }