Browse Source

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

master
Con Kolivas 11 years ago
parent
commit
a6fe8f392c
  1. 6
      src/connector.c

6
src/connector.c

@ -193,7 +193,11 @@ retry:
} }
ck_runlock(&ci->lock); 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 (ret < 0) {
if (interrupted()) if (interrupted())
goto retry; goto retry;

Loading…
Cancel
Save