if (unlikely(check->result == CHK_RES_FAILED))
goto out_wakeup;
- if (conn->flags & CO_FL_HANDSHAKE)
+ if (conn->flags & CO_FL_HANDSHAKE) {
+ SPIN_UNLOCK(SERVER_LOCK, &check->server->lock);
return;
+ }
if (retrieve_errno_from_socket(conn)) {
chk_report_conn_err(check, errno, 0);
goto out_wakeup;
/* wake() will take care of calling tcpcheck_main() */
- if (check->type == PR_O2_TCPCHK_CHK)
+ if (check->type == PR_O2_TCPCHK_CHK) {
+ SPIN_UNLOCK(SERVER_LOCK, &check->server->lock);
return;
+ }
if (check->bo->o) {
conn->mux->snd_buf(cs, check->bo, 0);
switch (ret) {
case SF_ERR_UP:
+ SPIN_UNLOCK(SERVER_LOCK, &check->server->lock);
return t;
case SF_ERR_NONE:
/* we allow up to min(inter, timeout.connect) for a connection
if (s->proxy->timeout.check)
t->expire = tick_first(t->expire, t_con);
}
+ SPIN_UNLOCK(SERVER_LOCK, &check->server->lock);
return retcode;
}