When some data are scheduled to be sent, we must be sure to subscribe for sends
if nothing was sent. Because of a bug, when nothing was sent, connection errors
are checks. If no error is found, we exit, waiting for more data, without any
subcription on send events.
No need to backport.
};
if (conn->mux->snd_buf(cs, &check->bo, b_data(&check->bo), 0) <= 0) {
- ret = TCPCHK_EVAL_WAIT;
- if ((conn->flags & CO_FL_ERROR) || (cs->flags & CS_FL_ERROR))
+ if ((conn->flags & CO_FL_ERROR) || (cs->flags & CS_FL_ERROR)) {
ret = TCPCHK_EVAL_STOP;
- goto out;
+ goto out;
+ }
}
if (b_data(&check->bo)) {
cs->conn->mux->subscribe(cs, SUB_RETRY_SEND, &check->wait_list);
if (ret <= 0) {
if ((conn && conn->flags & CO_FL_ERROR) || (cs && cs->flags & CS_FL_ERROR))
goto out_end_tcpcheck;
- goto out;
}
if (b_data(&check->bo)) {
cs->conn->mux->subscribe(cs, SUB_RETRY_SEND, &check->wait_list);