We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d0c2af commit 8edac23Copy full SHA for 8edac23
1 file changed
src/AdafruitIO.cpp
@@ -167,8 +167,8 @@ const __FlashStringHelper* AdafruitIO::statusText()
167
168
void AdafruitIO::run(uint16_t busywait_ms)
169
{
170
- // mqttStatus() will try to reconnect before returning
171
- if(mqttStatus() != AIO_CONNECTED) return;
+ // loop until we have a connection
+ while(mqttStatus() != AIO_CONNECTED){}
172
173
if(busywait_ms > 0)
174
_packetread_timeout = busywait_ms;
@@ -239,13 +239,6 @@ aio_status_t AdafruitIO::mqttStatus()
239
return _status;
240
}
241
242
- aio_status_t net_status = networkStatus();
243
- // if we aren't connected, return network status -- fail quickly
244
- if(net_status != AIO_NET_CONNECTED) {
245
- _status = net_status;
246
- return _status;
247
- }
248
-
249
if(_mqtt->connected())
250
return AIO_CONNECTED;
251
0 commit comments