From 051eed8bb5a913571140f8ca30bb5d261bcd5c21 Mon Sep 17 00:00:00 2001 From: Develo Date: Tue, 30 Apr 2019 17:35:55 -0400 Subject: [PATCH] Update StreamHttpClient.ino Fix WiFiClient vs. HttpClient declaration order Fixes #6028 --- .../examples/StreamHttpClient/StreamHttpClient.ino | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/ESP8266HTTPClient/examples/StreamHttpClient/StreamHttpClient.ino b/libraries/ESP8266HTTPClient/examples/StreamHttpClient/StreamHttpClient.ino index 10faa68b5d..626dbe7e3a 100644 --- a/libraries/ESP8266HTTPClient/examples/StreamHttpClient/StreamHttpClient.ino +++ b/libraries/ESP8266HTTPClient/examples/StreamHttpClient/StreamHttpClient.ino @@ -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");