From 8eebe5ea40177e7343eab7cf4178b8b845d74758 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 28 Oct 2007 22:07:08 +0100 Subject: [PATCH] [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. --- src/proto_uxst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto_uxst.c b/src/proto_uxst.c index 433837356..ca00b3188 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); }