Re-start loop if select fails

Fix Coverity error CID 56882

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
pull/25/head
Gregor Jasny 10 years ago committed by David Drysdale
parent bd2c61353f
commit 296ced3a0d
  1. 4
      acountry.c

@ -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);
}
}

Loading…
Cancel
Save