Browse Source

Check server fd is still valid as well as having its alive flag set

master
Con Kolivas 9 years ago
parent
commit
6ff89b31a2
  1. 3
      src/generator.c

3
src/generator.c

@ -213,8 +213,9 @@ retry:
* without blocking on server_alive() */ * without blocking on server_alive() */
for (i = 0; i < ckp->btcds; i++) { for (i = 0; i < ckp->btcds; i++) {
server_instance_t *si = ckp->servers[i]; server_instance_t *si = ckp->servers[i];
cs = &si->cs;
if (si->alive) { if (si->alive && cs->fd > 0) {
alive = si; alive = si;
goto living; goto living;
} }

Loading…
Cancel
Save