summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-05-22 21:51:17 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-05-22 21:51:17 (GMT)
commitd0dcc2cbec95f3bfae5da9ff07fc63833eb61342 (patch)
tree6c4008fc17693a67e20c054bdffbc5b19a1bc76e
parent0eeb80201f7b0cec320132546e3a5b5b6e1fae22 (diff)
downloaduscxml-d0dcc2cbec95f3bfae5da9ff07fc63833eb61342.zip
uscxml-d0dcc2cbec95f3bfae5da9ff07fc63833eb61342.tar.gz
uscxml-d0dcc2cbec95f3bfae5da9ff07fc63833eb61342.tar.bz2
Fixed URL fetching bug on Win32
-rw-r--r--src/uscxml/util/URL.cpp6
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 */