mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-08 08:12:51 -04:00
MEDIUM: peers: delay appctx initialization
Now that the session handler can automatically initialize the appctx, let's not do it in peers_accept() anymore.
This commit is contained in:
parent
e4d927ac1b
commit
6d7f8f77ba
1 changed files with 1 additions and 7 deletions
|
|
@ -1089,14 +1089,8 @@ static void peer_session_forceshutdown(struct session * session)
|
|||
*/
|
||||
int peer_accept(struct session *s)
|
||||
{
|
||||
struct appctx *appctx;
|
||||
|
||||
s->target = &peer_applet.obj_type;
|
||||
appctx = stream_int_register_handler(&s->si[1], objt_applet(s->target));
|
||||
if (!appctx)
|
||||
return -1;
|
||||
appctx->st0 = PEER_SESS_ST_ACCEPT;
|
||||
appctx->ctx.peers.ptr = s;
|
||||
/* no need to initialize the applet, it will start with st0=st1 = 0 */
|
||||
|
||||
tv_zero(&s->logs.tv_request);
|
||||
s->logs.t_queue = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue