mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
fix assert while attachstream'ing a connect-wait or
resolve-wait stream. svn:r6134
This commit is contained in:
parent
80f0492a65
commit
b5c6a990d3
@ -1831,13 +1831,13 @@ handle_control_attachstream(connection_t *conn, uint32_t len,
|
|||||||
|
|
||||||
/* Do we need to detach it first? */
|
/* Do we need to detach it first? */
|
||||||
if (ap_conn->state != AP_CONN_STATE_CONTROLLER_WAIT) {
|
if (ap_conn->state != AP_CONN_STATE_CONTROLLER_WAIT) {
|
||||||
circuit_t *tmpcirc = circuit_get_by_edge_conn(conn);
|
circuit_t *tmpcirc = circuit_get_by_edge_conn(ap_conn);
|
||||||
connection_edge_end(conn, END_STREAM_REASON_TIMEOUT, conn->cpath_layer);
|
connection_edge_end(ap_conn, END_STREAM_REASON_TIMEOUT, conn->cpath_layer);
|
||||||
/* Un-mark it as ending, since we're going to reuse it. */
|
/* Un-mark it as ending, since we're going to reuse it. */
|
||||||
conn->has_sent_end = 0;
|
ap_conn->has_sent_end = 0;
|
||||||
if (tmpcirc)
|
if (tmpcirc)
|
||||||
circuit_detach_stream(tmpcirc,conn);
|
circuit_detach_stream(tmpcirc,ap_conn);
|
||||||
conn->state = AP_CONN_STATE_CONTROLLER_WAIT;
|
ap_conn->state = AP_CONN_STATE_CONTROLLER_WAIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zero_circ) {
|
if (zero_circ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user