We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b6ff40 commit dbc4242Copy full SHA for dbc4242
src/ArduinoIoTCloudTCP.cpp
@@ -232,10 +232,6 @@ void ArduinoIoTCloudTCP::update()
232
#if defined (ARDUINO_ARCH_SAMD) || defined (ARDUINO_ARCH_MBED)
233
watchdog_reset();
234
#endif
235
-
236
- /* Check for new data from the MQTT client. */
237
- if (_mqttClient.connected())
238
- _mqttClient.poll();
239
}
240
241
int ArduinoIoTCloudTCP::connected()
@@ -307,6 +303,9 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_Connected()
307
303
return State::Disconnect;
308
304
309
305
306
+ /* Check for new data from the MQTT client. */
+ _mqttClient.poll();
+
310
/* Retransmit data in case there was a lost transaction due
311
* to phy layer or MQTT connectivity loss.
312
*/
0 commit comments