mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 23:14:46 +00:00
MINOR: checks: fix recv polling after connect()
Commit a522f801
moved a call to __conn_data_want_recv() just after the
connect() call, which is not 100% correct. First, it does not take errors
into account, eventhough this is harmless. Second, this change will only
be taken into account after next call do conn_data_polling_update(), which
is not necessarily what is expected (eg: if an error is only reported on
the recv side).
So let's use conn_data_poll_recv() instead, which directly subscribes
the event to polling.
This commit is contained in:
parent
b63b59641e
commit
db3b4a2891
@ -1323,7 +1323,6 @@ static struct task *process_chk(struct task *t)
|
||||
* connect() when a pure TCP check is used.
|
||||
*/
|
||||
ret = s->check.proto->connect(conn, (s->proxy->options2 & PR_O2_CHK_ANY) ? 1 : 2);
|
||||
__conn_data_want_recv(conn); /* prepare for reading a possible reply */
|
||||
conn->flags |= CO_FL_WAKE_DATA;
|
||||
if (s->check.send_proxy)
|
||||
conn->flags |= CO_FL_LOCAL_SPROXY;
|
||||
@ -1340,6 +1339,7 @@ static struct task *process_chk(struct task *t)
|
||||
int t_con = tick_add(now_ms, s->proxy->timeout.connect);
|
||||
t->expire = tick_first(t->expire, t_con);
|
||||
}
|
||||
conn_data_poll_recv(conn); /* prepare for reading a possible reply */
|
||||
goto reschedule;
|
||||
|
||||
case SN_ERR_SRVTO: /* ETIMEDOUT */
|
||||
|
Loading…
Reference in New Issue
Block a user