Skip to content

Commit c3fca55

Browse files
committed
fix failed read bug
1 parent d35e88a commit c3fca55

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/MQTTClient.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ inline lwmqtt_err_t lwmqtt_arduino_network_read(void *ref, uint8_t *buffer, size
4848
continue;
4949
}
5050

51+
// wait/unblock for some time (RTOS based boards may otherwise fail since the wifi task cannot provide the data)
52+
delay(1);
53+
5154
// otherwise check status
5255
if (!n->client->connected()) {
5356
return LWMQTT_NETWORK_FAILED_READ;

0 commit comments

Comments
 (0)