Skip to content

Commit

Permalink
Update StreamHttpClient.ino (esp8266#6030)
Browse files Browse the repository at this point in the history
Fix WiFiClient vs. HttpClient declaration order
Fixes esp8266#6028
devyte authored and earlephilhower committed May 1, 2019
1 parent 13589b1 commit 33a4c6a
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -38,9 +38,8 @@ void loop() {
// wait for WiFi connection
if ((WiFiMulti.run() == WL_CONNECTED)) {

HTTPClient http;

WiFiClient client;
HTTPClient http; //must be declared after WiFiClient for correct destruction order, because used by http.begin(client,...)

Serial.print("[HTTP] begin...\n");

0 comments on commit 33a4c6a

Please sign in to comment.