Skip to content

Commit 70b039c

Browse files
committed
Added yield calls to CloudStorage::loop in order to give time for esp to intercept events and changes
1 parent a66b631 commit 70b039c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/CloudStorage.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ class BaseCloudStorage {
6161

6262
// loop must be called for ws poll to run (for receiving updates from ws server)
6363
void loop() {
64-
client.poll();
64+
yield();
65+
if(client.available()) {
66+
client.poll();
67+
}
68+
yield();
6569
}
6670

6771
// Method for storing a key/value pair

0 commit comments

Comments
 (0)