mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
MINOR: fd: Don't forget to reset fdtab[fd].update when a fd is added/removed
It used to be guaranteed by the polling functions on a later call but with concurrent accesses it cannot be granted anymore.
This commit is contained in:
parent
f5b8adc5c0
commit
d531f88622
@ -338,6 +338,7 @@ static inline void fd_insert(int fd)
|
||||
{
|
||||
fdtab[fd].ev = 0;
|
||||
fdtab[fd].new = 1;
|
||||
fdtab[fd].updated = 0;
|
||||
fdtab[fd].linger_risk = 0;
|
||||
fdtab[fd].cloned = 0;
|
||||
if (fd + 1 > maxfd)
|
||||
|
||||
5
src/fd.c
5
src/fd.c
@ -190,10 +190,11 @@ static void fd_dodelete(int fd, int do_close)
|
||||
|
||||
port_range_release_port(fdinfo[fd].port_range, fdinfo[fd].local_port);
|
||||
fdinfo[fd].port_range = NULL;
|
||||
fdtab[fd].owner = NULL;
|
||||
fdtab[fd].updated = 0;
|
||||
fdtab[fd].new = 0;
|
||||
if (do_close)
|
||||
close(fd);
|
||||
fdtab[fd].owner = NULL;
|
||||
fdtab[fd].new = 0;
|
||||
|
||||
while ((maxfd-1 >= 0) && !fdtab[maxfd-1].owner)
|
||||
maxfd--;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user