mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
[MAJOR] frontend: don't initialize the server-side stream_int anymore
The frontend has no reason to initialize the server-side stream_interface. It's a leftover from old times which now makes no sense due to the fact that we don't know in the frontend whether the other side will be a socket, a task or anything else. Removing this part is possible due to previous patches which perform the initialization at the proper place. We'll still have to be able to register an I/O handler for situations where everything is known only to the frontend (eg: unix stats socket), before merging the various instanciations of this accept() function.
This commit is contained in:
parent
a8f55d5473
commit
a360d28e84
@ -142,21 +142,15 @@ int frontend_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* pre-initialize the other side's stream interface */
|
||||
|
||||
/* pre-initialize the other side's stream interface to an INIT state */
|
||||
s->si[1].owner = t;
|
||||
s->si[1].state = s->si[1].prev_state = SI_ST_INI;
|
||||
s->si[1].err_type = SI_ET_NONE;
|
||||
s->si[1].err_loc = NULL;
|
||||
s->si[1].owner = t;
|
||||
s->si[1].update = stream_sock_data_finish;
|
||||
s->si[1].shutr = stream_sock_shutr;
|
||||
s->si[1].shutw = stream_sock_shutw;
|
||||
s->si[1].chk_rcv = stream_sock_chk_rcv;
|
||||
s->si[1].chk_snd = stream_sock_chk_snd;
|
||||
s->si[1].connect = tcpv4_connect_server;
|
||||
s->si[1].iohandler = NULL;
|
||||
s->si[1].exp = TICK_ETERNITY;
|
||||
s->si[1].fd = -1; /* just to help with debugging */
|
||||
|
||||
s->si[1].flags = SI_FL_NONE;
|
||||
if (likely(s->be->options2 & PR_O2_INDEPSTR))
|
||||
s->si[1].flags |= SI_FL_INDEP_STR;
|
||||
|
Loading…
x
Reference in New Issue
Block a user