mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-11 03:31:36 +00:00
BUG/MEDIUM: lua: the lua fucntion Channel:close() causes a segfault
The function dont remove remaineing analysers and dont update response channel timeout. The fix is a copy of the behavior of the functions http_apply_redirect_rule() and stream_int_retnclose().
This commit is contained in:
parent
bdc97a8795
commit
10ec214f41
@ -3621,13 +3621,17 @@ __LJMP static int hlua_txn_close(lua_State *L)
|
||||
ic = &htxn->s->req;
|
||||
oc = &htxn->s->res;
|
||||
|
||||
channel_auto_read(ic);
|
||||
channel_abort(ic);
|
||||
channel_auto_close(ic);
|
||||
channel_erase(ic);
|
||||
|
||||
oc->wex = tick_add_ifset(now_ms, oc->wto);
|
||||
channel_auto_read(oc);
|
||||
channel_auto_close(oc);
|
||||
channel_shutr_now(oc);
|
||||
|
||||
htxn->s->txn->req.chn->analysers = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user