]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MEDIUM] unbind_listener() must use fd_delete() and not close()
authorWilly Tarreau <w@1wt.eu>
Sun, 28 Oct 2007 21:07:08 +0000 (22:07 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 4 Nov 2007 21:42:48 +0000 (22:42 +0100)
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

index 43383735664553b15bbb6a132aba99630ff67b7e..ca00b3188fdbb2644b390c3a73a5ee1325bc0d3b 100644 (file)
@@ -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);
        }