mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-11 09:37:20 +02:00
BUG/MINOR: listener: fix resume_listener() resume return value handling
In resume_listener(), proto->resume() errors were not properly handled: the function kept flowing down as if no errors were detected. Instead, we're performing an early return when such errors are detected to prevent undefined behaviors. This could be backported up to 2.4. -- Backport notes: This commit depends on: - "MINOR: listener: make sure we don't pause/resume bypassed listeners" -> 2.4 ... 2.7: Replace this: | if (l->bind_conf->maxconn && l->nbconn >= l->bind_conf->maxconn) { | l->rx.proto->disable(l); By this: | if (l->maxconn && l->nbconn >= l->maxconn) { | l->rx.proto->disable(l);
This commit is contained in:
parent
7a15fa58b1
commit
3bb2a38f01
@ -554,8 +554,11 @@ int resume_listener(struct listener *l, int lpx, int lli)
|
||||
if (!(l->flags & LI_F_FINALIZED) || l->state == LI_READY)
|
||||
goto end;
|
||||
|
||||
if (l->rx.proto->resume)
|
||||
if (l->rx.proto->resume) {
|
||||
ret = l->rx.proto->resume(l);
|
||||
if (!ret)
|
||||
goto end; /* failure to resume */
|
||||
}
|
||||
|
||||
if (l->bind_conf->maxconn && l->nbconn >= l->bind_conf->maxconn) {
|
||||
l->rx.proto->disable(l);
|
||||
|
Loading…
Reference in New Issue
Block a user