Set state to Active slightly earlier in wxWebRequestWinHTTP

This is more consistent with the other backends, which all change the
state before actually launching the asynchronous request.
This commit is contained in:
Vadim Zeitlin
2021-01-16 14:40:08 +01:00
parent 5babe577ce
commit a52f353321

View File

@@ -381,6 +381,8 @@ void wxWebRequestWinHTTP::SendRequest()
if ( m_dataSize )
m_dataWritten = 0;
SetState(wxWebRequest::State_Active);
// Send request
if ( !::WinHttpSendRequest
(
@@ -394,8 +396,6 @@ void wxWebRequestWinHTTP::SendRequest()
SetFailedWithLastError();
return;
}
SetState(wxWebRequest::State_Active);
}
void wxWebRequestWinHTTP::DoCancel()