aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2002-09-20 19:33:13 +0000
committerRoger Dingledine <arma@torproject.org>2002-09-20 19:33:13 +0000
commit8019f2250c2f5383732cf16dd1b918abd7380d98 (patch)
tree9cecdc1daa35b9fee11fa76e161bbc75ec307b24
parent5449fc86db2fc448f5ba26445fd4b69bf99e9593 (diff)
downloadtor-8019f2250c2f5383732cf16dd1b918abd7380d98.tar
tor-8019f2250c2f5383732cf16dd1b918abd7380d98.tar.gz
OP was hanging on first try if connect finishes too quickly
svn:r105
-rw-r--r--src/or/connection_op.c3
-rw-r--r--src/or/connection_or.c5
2 files changed, 3 insertions, 5 deletions
diff --git a/src/or/connection_op.c b/src/or/connection_op.c
index 2ee1de317..89204412e 100644
--- a/src/or/connection_op.c
+++ b/src/or/connection_op.c
@@ -27,7 +27,6 @@ int connection_op_process_inbuf(connection_t *conn) {
}
return 0;
-
}
int op_handshake_process_keys(connection_t *conn) {
@@ -90,7 +89,7 @@ int op_handshake_process_keys(connection_t *conn) {
connection_init_timeval(conn);
connection_watch_events(conn, POLLIN);
- return 0;
+ return connection_process_inbuf(conn); /* in case they sent some cells along with the keys */
}
int connection_op_finished_flushing(connection_t *conn) {
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index fc22f4076..c16296a61 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -89,7 +89,7 @@ int connection_or_finished_flushing(connection_t *conn) {
conn->state = OR_CONN_STATE_OPEN;
connection_init_timeval(conn);
connection_watch_events(conn, POLLIN);
- return 0;
+ return connection_process_inbuf(conn); /* in case there's anything waiting on it */
case OR_CONN_STATE_SERVER_SENDING_AUTH:
log(LOG_DEBUG,"connection_or_finished_flushing(): server finished sending auth.");
conn->state = OR_CONN_STATE_SERVER_NONCE_WAIT;
@@ -331,8 +331,7 @@ int or_handshake_op_finished_sending_keys(connection_t *conn) {
conn->state = OR_CONN_STATE_OPEN;
connection_init_timeval(conn);
connection_watch_events(conn, POLLIN); /* give it a default, tho the ap_handshake call may change it */
- ap_handshake_n_conn_open(conn); /* send the pending onion */
- return 0;
+ return ap_handshake_n_conn_open(conn); /* send the pending onion */
}