BUG/MEDIUM: checks: Don't bother subscribing if we have a connection error.
In __event_srv_chk_r() and __event_srv_chk_w(), don't bother subscribing if we're waiting for a handshake, but we had a connection error. We will never be able to send/receive anything on that connection anyway, and the conn_stream is probably about to be destroyed, and we will crash if the tasklet is waken up. I'm not convinced we need to subscribe here at all anyway, but I'd rather modify the check code as little as possible. This should be backported to 1.9.
This commit is contained in:
parent
f94afebb94
commit
06f6811d9f
@ -753,7 +753,8 @@ static void __event_srv_chk_w(struct conn_stream *cs)
|
||||
goto out_wakeup;
|
||||
|
||||
if (conn->flags & CO_FL_HANDSHAKE) {
|
||||
cs->conn->mux->subscribe(cs, SUB_RETRY_SEND, &check->wait_list);
|
||||
if (!(conn->flags & CO_FL_ERROR))
|
||||
cs->conn->mux->subscribe(cs, SUB_RETRY_SEND, &check->wait_list);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -838,7 +839,8 @@ static void __event_srv_chk_r(struct conn_stream *cs)
|
||||
goto out_wakeup;
|
||||
|
||||
if (conn->flags & CO_FL_HANDSHAKE) {
|
||||
cs->conn->mux->subscribe(cs, SUB_RETRY_RECV, &check->wait_list);
|
||||
if (!(conn->flags & CO_FL_ERROR))
|
||||
cs->conn->mux->subscribe(cs, SUB_RETRY_RECV, &check->wait_list);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user