From: Frank Lahm Date: Fri, 22 Jul 2011 13:16:50 +0000 (+0200) Subject: In disconnected state afpd process was still reading from socket every SIGALARM X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=77f2fc665e6393f17510ebd95956a9bc677091fe In disconnected state afpd process was still reading from socket every SIGALARM --- diff --git a/etc/afpd/afp_dsi.c b/etc/afpd/afp_dsi.c index 8fc7c0fb..0707aebc 100644 --- a/etc/afpd/afp_dsi.c +++ b/etc/afpd/afp_dsi.c @@ -517,7 +517,8 @@ void afp_over_dsi(AFPObj *obj) if (dsi_disconnect(dsi) != 0) afp_dsi_die(EXITERR_CLNT); - pause(); /* gets interrupted by SIGALARM or SIGURG tickle */ + while (dsi->flags & DSI_DISCONNECTED) + pause(); /* gets interrupted by SIGALARM or SIGURG tickle */ continue; /* continue receiving until disconnect timer expires * or a primary reconnect succeeds */ }