chiark / gitweb /
socket-proxyd: Fix-up from previous change to avoid looping on errors.
authorDavid Strauss <david@davidstrauss.net>
Tue, 22 Oct 2013 01:41:35 +0000 (18:41 -0700)
committerDavid Strauss <david@davidstrauss.net>
Tue, 22 Oct 2013 01:41:35 +0000 (18:41 -0700)
src/socket-proxy/socket-proxyd.c

index 4eec79e..054a27a 100644 (file)
@@ -442,8 +442,10 @@ static int accept_cb(sd_event_source *s, int fd, uint32_t revents, void *userdat
                 r = do_accept(e, p, fd);
                 if (r == -EAGAIN || r == -EWOULDBLOCK)
                         break;
-                if (r < 0)
+                if (r < 0) {
                         log_error("Error %d while trying to accept: %s", r, strerror(-r));
+                        break;
+                }
         }
 
         /* Re-enable the watcher. */