diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-05-22 21:51:17 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-05-22 21:51:17 (GMT) |
commit | d0dcc2cbec95f3bfae5da9ff07fc63833eb61342 (patch) | |
tree | 6c4008fc17693a67e20c054bdffbc5b19a1bc76e /src | |
parent | 0eeb80201f7b0cec320132546e3a5b5b6e1fae22 (diff) | |
download | uscxml-d0dcc2cbec95f3bfae5da9ff07fc63833eb61342.zip uscxml-d0dcc2cbec95f3bfae5da9ff07fc63833eb61342.tar.gz uscxml-d0dcc2cbec95f3bfae5da9ff07fc63833eb61342.tar.bz2 |
Fixed URL fetching bug on Win32
Diffstat (limited to 'src')
-rw-r--r-- | src/uscxml/util/URL.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/uscxml/util/URL.cpp b/src/uscxml/util/URL.cpp index ded4ae8..3fcb387 100644 --- a/src/uscxml/util/URL.cpp +++ b/src/uscxml/util/URL.cpp @@ -939,6 +939,9 @@ void URLFetcher::perform() { if (err != CURLM_OK) { LOGD(USCXML_WARN) << "curl_multi_timeout: " << curl_multi_strerror(err) << std::endl; } + // select on windows return -1, but this will make progress, see + // https://curl.haxx.se/mail/lib-2006-10/0100.html + while(CURLM_CALL_MULTI_PERFORM == curl_multi_perform(_multiHandle, &stillRunning)); } if(curlTimeOut >= 0) { @@ -964,6 +967,8 @@ void URLFetcher::perform() { switch(rc) { case -1: { /* select error */ +#if 0 + // this is not an actual error - there was just nothing to process #ifdef _WIN32 char *s = NULL; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, @@ -973,6 +978,7 @@ void URLFetcher::perform() { LOGD(USCXML_WARN) << "select: " << s << std::endl; LocalFree(s); #endif +#endif break; } case 0: /* timeout */ |