mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
clear _canReuse in setUrl if its not a local redirect (#7039)
This commit is contained in:
@ -549,7 +549,8 @@ bool HTTPClient::setURL(const String& url)
|
||||
DEBUG_HTTPCLIENT("[HTTP-Client][setURL] new URL not the same protocol, expected '%s', URL: '%s'\n", _protocol.c_str(), url.c_str());
|
||||
return false;
|
||||
}
|
||||
// disconnect but preserve _client
|
||||
// disconnect but preserve _client (clear _canReuse so disconnect will close the connection)
|
||||
_canReuse = false;
|
||||
disconnect(true);
|
||||
return beginInternal(url, nullptr);
|
||||
}
|
||||
|
Reference in New Issue
Block a user