summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-03-22 23:57:18 +0000
committerRoger Dingledine <arma@torproject.org>2005-03-22 23:57:18 +0000
commite28b8aaa4078a9318227edd554a7296199b95f5a (patch)
tree3be6e54819954d1d5571bc4db1a4a176522319cd
parent21b1adefbb4697267dfc786096faf79ea6bdca18 (diff)
downloadtor-e28b8aaa4078a9318227edd554a7296199b95f5a.tar.gz
tor-e28b8aaa4078a9318227edd554a7296199b95f5a.zip
make httpsproxy more likely to work
(don't let OR conns do tls until they've finished connecting and doing the proxy dance.) svn:r3824
-rw-r--r--src/or/connection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 402ae61b55..1f09bc43a9 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -960,7 +960,7 @@ static int connection_read_to_buf(connection_t *conn, int *max_to_read) {
at_most = connection_bucket_read_limit(conn);
}
- if (connection_speaks_cells(conn) && conn->state != OR_CONN_STATE_CONNECTING) {
+ if (connection_speaks_cells(conn) && conn->state > OR_CONN_STATE_PROXY_READING) {
int pending;
if (conn->state == OR_CONN_STATE_HANDSHAKING) {
/* continue handshaking even if global token bucket is empty */
@@ -1108,7 +1108,7 @@ int connection_handle_write(connection_t *conn) {
return -1;
}
- if (connection_speaks_cells(conn)) {
+ if (connection_speaks_cells(conn) && conn->state > OR_CONN_STATE_PROXY_READING) {
if (conn->state == OR_CONN_STATE_HANDSHAKING) {
connection_stop_writing(conn);
if (connection_tls_continue_handshake(conn) < 0) {