Skip to content

Commit

Permalink
Add yield to the parse loop
Browse files Browse the repository at this point in the history
This is to avoid famishin the WiFi stack.

Fixes #131
  • Loading branch information
marcelstoer committed Aug 18, 2018
1 parent f973aff commit 9407952
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"espressif8266",
"espressif32"
],
"version": "1.6.1"
"version": "1.6.2"
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESP8266 Weather Station
version=1.6.1
version=1.6.2
author=ThingPulse
maintainer=ThingPulse <[email protected]>
sentence=ESP8266 based internet connected Weather Station
Expand Down
2 changes: 2 additions & 0 deletions src/OpenWeatherMapCurrent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ void OpenWeatherMapCurrent::doUpdate(OpenWeatherMapCurrentData *data, String url
if (isBody) {
parser.parse(c);
}
// give WiFi and TCP/IP libraries a chance to handle pending events
yield();
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/OpenWeatherMapForecast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ uint8_t OpenWeatherMapForecast::doUpdate(OpenWeatherMapForecastData *data, Strin
if (isBody) {
parser.parse(c);
}
// give WiFi and TCP/IP libraries a chance to handle pending events
yield();
}
}
}
Expand Down

0 comments on commit 9407952

Please sign in to comment.