We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 25e6583 + dbc4242 commit ae0194dCopy full SHA for ae0194d
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()
@@ -304,6 +300,9 @@ ArduinoIoTCloudTCP::State ArduinoIoTCloudTCP::handle_Connected()
304
300
return State::Disconnect;
305
301
306
302
303
+ /* Check for new data from the MQTT client. */
+ _mqttClient.poll();
+
307
/* Retransmit data in case there was a lost transaction due
308
* to phy layer or MQTT connectivity loss.
309
*/
0 commit comments