File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -167,8 +167,8 @@ const __FlashStringHelper* AdafruitIO::statusText()
167
167
168
168
void AdafruitIO::run (uint16_t busywait_ms)
169
169
{
170
- // mqttStatus() will try to reconnect before returning
171
- if (mqttStatus () != AIO_CONNECTED) return ;
170
+ // loop until we have a connection
171
+ while (mqttStatus () != AIO_CONNECTED){}
172
172
173
173
if (busywait_ms > 0 )
174
174
_packetread_timeout = busywait_ms;
@@ -239,13 +239,6 @@ aio_status_t AdafruitIO::mqttStatus()
239
239
return _status;
240
240
}
241
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
242
if (_mqtt->connected ())
250
243
return AIO_CONNECTED;
251
244
You can’t perform that action at this time.
0 commit comments