1
0
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:
Sandeep Mistry 2016-06-17 16:38:09 -04:00
parent 70dc5ee44e
commit 0bcba913fd

View File

@ -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;