MXS-2208 If no sockets, then we use timeout

If no sockets, then we use timeout; not the other way around.
This commit is contained in:
Johan Wikman
2018-12-14 15:35:37 +02:00
parent 1d338f3c4a
commit 38a0d6a2df

View File

@ -234,12 +234,12 @@ void execute(CURLM* pCurlm,
if (maxfd == -1) if (maxfd == -1)
{ {
rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
rc = select(0, NULL, NULL, NULL, &wait);
} }
else else
{ {
struct timeval wait = { 0, 100 * 1000 }; /* 100ms */ rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout);
rc = select(0, NULL, NULL, NULL, &wait);
} }
switch (rc) switch (rc)