From cdd8208269b9ac21bf59be238321473a257257cc Mon Sep 17 00:00:00 2001 From: ckolivas Date: Thu, 26 Jun 2014 09:50:37 +0300 Subject: [PATCH] accept() calls are automatically restarted with EINTR when there's no timeout --- src/stratifier.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index e3135926..9351ff6b 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -949,11 +949,9 @@ retry: sockd = accept(us->sockd, NULL, NULL); if (sockd < 0) { - if (interrupted()) - goto retry; - LOGERR("Failed to accept on stratifier socket, retrying in 5s"); - sleep(5); - goto retry; + LOGERR("Failed to accept on stratifier socket, exiting"); + ret = 1; + goto out; } dealloc(buf);