Skip to content

Commit 8edac23

Browse files
committed
Revert "Detect dropped network connection"
This reverts commit 4639a9f.
1 parent 5d0c2af commit 8edac23

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/AdafruitIO.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ const __FlashStringHelper* AdafruitIO::statusText()
167167

168168
void AdafruitIO::run(uint16_t busywait_ms)
169169
{
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){}
172172

173173
if(busywait_ms > 0)
174174
_packetread_timeout = busywait_ms;
@@ -239,13 +239,6 @@ aio_status_t AdafruitIO::mqttStatus()
239239
return _status;
240240
}
241241

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-
249242
if(_mqtt->connected())
250243
return AIO_CONNECTED;
251244

0 commit comments

Comments
 (0)