1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-06 11:19:49 +00:00

Re-start loop if select fails

Fix Coverity error CID 56882

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
This commit is contained in:
Gregor Jasny
2014-09-28 22:19:26 +02:00
committed by David Drysdale
parent bd2c61353f
commit 296ced3a0d

View File

@ -200,7 +200,9 @@ static void wait_ares(ares_channel channel)
if (nfds == 0)
break;
tvp = ares_timeout(channel, NULL, &tv);
select(nfds, &read_fds, &write_fds, NULL, tvp);
nfds = select(nfds, &read_fds, &write_fds, NULL, tvp);
if (nfds < 0)
continue;
ares_process(channel, &read_fds, &write_fds);
}
}