mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MEDIUM: listener: Bind listeners on a thread subset if specified
If a "process" option with a thread set is used on the bind line, we use the corresponding bitmask when the listener's FD is created.
This commit is contained in:
parent
c644fa9bf5
commit
165f07e7b4
@ -1107,7 +1107,10 @@ int tcp_bind_listener(struct listener *listener, char *errmsg, int errlen)
|
|||||||
|
|
||||||
fdtab[fd].owner = listener; /* reference the listener instead of a task */
|
fdtab[fd].owner = listener; /* reference the listener instead of a task */
|
||||||
fdtab[fd].iocb = listener->proto->accept;
|
fdtab[fd].iocb = listener->proto->accept;
|
||||||
fd_insert(fd, MAX_THREADS_MASK);
|
if (listener->bind_conf->bind_thread[relative_pid-1])
|
||||||
|
fd_insert(fd, listener->bind_conf->bind_thread[relative_pid-1]);
|
||||||
|
else
|
||||||
|
fd_insert(fd, MAX_THREADS_MASK);
|
||||||
|
|
||||||
tcp_return:
|
tcp_return:
|
||||||
if (msg && errlen) {
|
if (msg && errlen) {
|
||||||
|
@ -334,7 +334,10 @@ static int uxst_bind_listener(struct listener *listener, char *errmsg, int errle
|
|||||||
/* the function for the accept() event */
|
/* the function for the accept() event */
|
||||||
fdtab[fd].iocb = listener->proto->accept;
|
fdtab[fd].iocb = listener->proto->accept;
|
||||||
fdtab[fd].owner = listener; /* reference the listener instead of a task */
|
fdtab[fd].owner = listener; /* reference the listener instead of a task */
|
||||||
fd_insert(fd, MAX_THREADS_MASK);
|
if (listener->bind_conf->bind_thread[relative_pid-1])
|
||||||
|
fd_insert(fd, listener->bind_conf->bind_thread[relative_pid-1]);
|
||||||
|
else
|
||||||
|
fd_insert(fd, MAX_THREADS_MASK);
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
err_rename:
|
err_rename:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user