mirror of
https://github.com/haproxy/haproxy.git
synced 2026-07-14 19:43:29 -04:00
BUG/MEDIUM: mworker: does not abort() in mworker_pipe_register()
The process was aborting with nbthread > 1. The mworker_pipe_register() could be called several time in multithread mode, we don't want to abort() there.
This commit is contained in:
parent
8ccd2081f5
commit
a90cacfd70
1 changed files with 2 additions and 4 deletions
|
|
@ -2580,15 +2580,13 @@ void mworker_accept_wrapper(int fd)
|
|||
}
|
||||
|
||||
/*
|
||||
* Should only be called once per process
|
||||
* This function register the accept wrapper for the sockpair of the master worker
|
||||
*/
|
||||
|
||||
void mworker_pipe_register()
|
||||
{
|
||||
/* The iocb should be already initialized with listener_accept */
|
||||
if (fdtab[proc_self->ipc_fd[1]].iocb != listener_accept)
|
||||
abort();
|
||||
if (fdtab[proc_self->ipc_fd[1]].iocb == mworker_accept_wrapper)
|
||||
return;
|
||||
|
||||
fcntl(proc_self->ipc_fd[1], F_SETFL, O_NONBLOCK);
|
||||
/* In multi-tread, we need only one thread to process
|
||||
|
|
|
|||
Loading…
Reference in a new issue