Check wxWebSessionCURL::StartRequest really starts
This commit is contained in:
@@ -999,16 +999,24 @@ bool wxWebSessionCURL::StartRequest(wxWebRequestCURL & request)
|
|||||||
{
|
{
|
||||||
// Add request easy handle to multi handle
|
// Add request easy handle to multi handle
|
||||||
CURL* curl = request.GetHandle();
|
CURL* curl = request.GetHandle();
|
||||||
curl_multi_add_handle(m_handle, curl);
|
int code = curl_multi_add_handle(m_handle, curl);
|
||||||
|
|
||||||
|
if ( code == CURLM_OK )
|
||||||
|
{
|
||||||
request.SetState(wxWebRequest::State_Active);
|
request.SetState(wxWebRequest::State_Active);
|
||||||
|
|
||||||
// Report a timeout to curl to initiate this transfer.
|
// Report a timeout to curl to initiate this transfer.
|
||||||
int runningHandles;
|
int runningHandles;
|
||||||
curl_multi_socket_action(m_handle, CURL_SOCKET_TIMEOUT, 0, &runningHandles);
|
curl_multi_socket_action(m_handle, CURL_SOCKET_TIMEOUT, 0,
|
||||||
|
&runningHandles);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void wxWebSessionCURL::CancelRequest(wxWebRequestCURL* request)
|
void wxWebSessionCURL::CancelRequest(wxWebRequestCURL* request)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user