Sleep briefly, don't poll when no fds are present

This commit is contained in:
Con Kolivas 2014-04-28 13:33:40 +10:00
parent c1c5b22058
commit a6fe8f392c

View File

@ -193,7 +193,11 @@ retry:
}
ck_runlock(&ci->lock);
ret = poll(fds, nfds, 60000);
if (!nfds) {
cksleep_ms(100);
goto retry;
}
ret = poll(fds, nfds, 1000);
if (ret < 0) {
if (interrupted())
goto retry;