[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.
This commit is contained in:
Willy Tarreau 2007-10-28 22:07:08 +01:00
parent dabf2e2647
commit 8eebe5ea40

View 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);
}