From: Willy Tarreau Date: Sun, 28 Oct 2007 21:07:08 +0000 (+0100) Subject: [MEDIUM] unbind_listener() must use fd_delete() and not close() X-Git-Tag: v1.3.14~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8eebe5ea40177e7343eab7cf4178b8b845d74758;p=thirdparty%2Fhaproxy.git [MEDIUM] unbind_listener() must use fd_delete() and not close() It is important that unbind_listener() calls fd_delete() to remove a file descriptor, because only this one can update the fdtab and the maxfd entries. --- diff --git a/src/proto_uxst.c b/src/proto_uxst.c index 4338373566..ca00b3188f 100644 --- a/src/proto_uxst.c +++ b/src/proto_uxst.c @@ -289,7 +289,7 @@ static int uxst_unbind_listener(struct listener *listener) EV_FD_CLR(listener->fd, DIR_RD); if (listener->state >= LI_LISTEN) { - close(listener->fd); + fd_delete(listener->fd); listener->state = LI_ASSIGNED; destroy_uxst_socket(((struct sockaddr_un *)&listener->addr)->sun_path); }