mirror of
https://github.com/arduino-libraries/ArduinoHttpClient.git
synced 2025-04-19 21:22:15 +03:00
Move storing of initialState in startRequest to the start
This commit is contained in:
parent
70dc5ee44e
commit
0bcba913fd
@ -56,6 +56,8 @@ void HttpClient::beginRequest()
|
||||
|
||||
int HttpClient::startRequest(const char* aURLPath, const char* aHttpMethod)
|
||||
{
|
||||
tHttpState initialState = iState;
|
||||
|
||||
if (!iConnectionClose)
|
||||
{
|
||||
flushClientRx();
|
||||
@ -63,7 +65,6 @@ int HttpClient::startRequest(const char* aURLPath, const char* aHttpMethod)
|
||||
resetState();
|
||||
}
|
||||
|
||||
tHttpState initialState = iState;
|
||||
if ((eIdle != iState) && (eRequestStarted != iState))
|
||||
{
|
||||
return HTTP_ERROR_API;
|
||||
|
Loading…
x
Reference in New Issue
Block a user