From: Marc Hoersken Date: Wed, 23 Dec 2015 14:04:02 +0000 (+0100) Subject: sockfilt.c: fix calculation of sleep timeout on Windows X-Git-Tag: curl-7_47_0~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7bf5f6e0549db74973447ee8b26de589971fb2b8;p=thirdparty%2Fcurl.git sockfilt.c: fix calculation of sleep timeout on Windows Not converting to double caused small timeouts to be skipped. --- diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index cf090cafb6..3c549997d0 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -696,7 +696,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds, /* check if we got descriptors, sleep in case we got none */ if(!nfds) { - Sleep((timeout->tv_sec * 1000) + (timeout->tv_usec / 1000)); + Sleep((timeout->tv_sec*1000)+(DWORD)(((double)timeout->tv_usec)/1000.0)); return 0; }