Browse Source

accept() calls are automatically restarted with EINTR when there's no timeout

master
ckolivas 11 years ago
parent
commit
cdd8208269
  1. 8
      src/stratifier.c

8
src/stratifier.c

@ -949,11 +949,9 @@ retry:
sockd = accept(us->sockd, NULL, NULL); sockd = accept(us->sockd, NULL, NULL);
if (sockd < 0) { if (sockd < 0) {
if (interrupted()) LOGERR("Failed to accept on stratifier socket, exiting");
goto retry; ret = 1;
LOGERR("Failed to accept on stratifier socket, retrying in 5s"); goto out;
sleep(5);
goto retry;
} }
dealloc(buf); dealloc(buf);

Loading…
Cancel
Save