diff options
author | Roger Dingledine <arma@torproject.org> | 2002-09-26 05:50:51 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2002-09-26 05:50:51 +0000 |
commit | d6360c57bc888ee61705ea56918a0256afe2f68c (patch) | |
tree | 9435d072d4c0401b04598670458eafe968d3fa06 | |
parent | 253f0f160e1185cbab507920b6391064757be677 (diff) | |
download | tor-d6360c57bc888ee61705ea56918a0256afe2f68c.tar tor-d6360c57bc888ee61705ea56918a0256afe2f68c.tar.gz |
another bugfix on the proxy side
should be more reliable now (?)
svn:r111
-rw-r--r-- | src/or/connection_ap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/connection_ap.c b/src/or/connection_ap.c index a680f5025..7f22addc6 100644 --- a/src/or/connection_ap.c +++ b/src/or/connection_ap.c @@ -200,6 +200,9 @@ int ap_handshake_establish_circuit(connection_t *conn, unsigned int *route, int return -1; } + conn->state = AP_CONN_STATE_OR_WAIT; + connection_stop_reading(conn); /* Stop listening for input from the AP! */ + if(!n_conn) { /* launch the connection */ n_conn = connect_to_router_as_op(firsthop); if(!n_conn) { /* connect failed, forget the whole thing */ @@ -208,8 +211,7 @@ int ap_handshake_establish_circuit(connection_t *conn, unsigned int *route, int return -1; } } - conn->state = AP_CONN_STATE_OR_WAIT; - connection_stop_reading(conn); /* Stop listening for input from the AP! */ + return 0; /* return success. The onion/circuit/etc will be taken care of automatically * (may already have been) whenever n_conn reaches OR_CONN_STATE_OPEN. */ |