Skip to content

Commit 0da6906

Browse files
authored
Update DigestAuthorization.ino (#6029)
Fix WiFiClient vs. HttpClient declaration order
1 parent 33a4c6a commit 0da6906

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libraries/ESP8266HTTPClient/examples/DigestAuthorization/DigestAuthorization.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ void setup() {
9898
}
9999

100100
void loop() {
101-
HTTPClient http;
102-
103101
WiFiClient client;
102+
HTTPClient http; //must be declared after WiFiClient for correct destruction order, because used by http.begin(client,...)
104103

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

0 commit comments

Comments
 (0)