mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
[BUG] stream_interface: only call si->release when both dirs are closed
si->release() was called each time we closed one direction of a stream interface, while it should only have been called when both sides are closed. This bug is specific to 1.5 and only affects embedded tasks.
This commit is contained in:
parent
f6e2cc79d8
commit
d8ccffe0f6
@ -192,10 +192,10 @@ void stream_int_shutr(struct stream_interface *si)
|
|||||||
if (si->ob->flags & BF_SHUTW) {
|
if (si->ob->flags & BF_SHUTW) {
|
||||||
si->state = SI_ST_DIS;
|
si->state = SI_ST_DIS;
|
||||||
si->exp = TICK_ETERNITY;
|
si->exp = TICK_ETERNITY;
|
||||||
}
|
|
||||||
|
|
||||||
if (si->release)
|
if (si->release)
|
||||||
si->release(si);
|
si->release(si);
|
||||||
|
}
|
||||||
|
|
||||||
/* note that if the task exist, it must unregister itself once it runs */
|
/* note that if the task exist, it must unregister itself once it runs */
|
||||||
if (!(si->flags & SI_FL_DONT_WAKE) && si->owner)
|
if (!(si->flags & SI_FL_DONT_WAKE) && si->owner)
|
||||||
@ -226,6 +226,9 @@ void stream_int_shutw(struct stream_interface *si)
|
|||||||
case SI_ST_CER:
|
case SI_ST_CER:
|
||||||
si->state = SI_ST_DIS;
|
si->state = SI_ST_DIS;
|
||||||
/* fall through */
|
/* fall through */
|
||||||
|
|
||||||
|
if (si->release)
|
||||||
|
si->release(si);
|
||||||
default:
|
default:
|
||||||
si->flags &= ~SI_FL_WAIT_ROOM;
|
si->flags &= ~SI_FL_WAIT_ROOM;
|
||||||
si->ib->flags |= BF_SHUTR;
|
si->ib->flags |= BF_SHUTR;
|
||||||
@ -233,9 +236,6 @@ void stream_int_shutw(struct stream_interface *si)
|
|||||||
si->exp = TICK_ETERNITY;
|
si->exp = TICK_ETERNITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (si->release)
|
|
||||||
si->release(si);
|
|
||||||
|
|
||||||
/* note that if the task exist, it must unregister itself once it runs */
|
/* note that if the task exist, it must unregister itself once it runs */
|
||||||
if (!(si->flags & SI_FL_DONT_WAKE) && si->owner)
|
if (!(si->flags & SI_FL_DONT_WAKE) && si->owner)
|
||||||
task_wakeup(si->owner, TASK_WOKEN_IO);
|
task_wakeup(si->owner, TASK_WOKEN_IO);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user