Change cancel method for wxWebRequestCURL objects
Previously wxWebRequestCURL objects were canceled by removing their CURL easy handle from the CURLM multihandle. Unfortunately the really only pauses the connection and does not truly cancel it. This commit tries to stop the transfer by retrieving the active socket from the CURL handle for the transfer and closing it. There are some complications in doing this because the option curl uses to get the socket have changed over the years. A combination of compile time and run time checks are used to use the appropriate options to get the socket. However in the case of 64bit windows using a curl version older than 7.45.0 simply won’t have an usable option. In this case, it seems nothing can be done.
This commit is contained in:
@@ -167,6 +167,7 @@ private:
|
||||
void ProcessSocketCallback(curl_socket_t, int);
|
||||
void ProcessSocketPollerResult(wxThreadEvent&);
|
||||
void CheckForCompletedTransfers();
|
||||
void StopTransfer(CURL*);
|
||||
|
||||
WX_DECLARE_HASH_MAP(CURL*, wxWebRequestCURL*, wxPointerHash, \
|
||||
wxPointerEqual, TransferSet);
|
||||
|
Reference in New Issue
Block a user