diff options
author | cypherpunks <cypherpunks@torproject.org> | 2018-08-27 01:32:34 +0000 |
---|---|---|
committer | cypherpunks <cypherpunks@torproject.org> | 2018-08-27 01:32:34 +0000 |
commit | 0cd72a28339e829443f142743bbc1bd8ede0fbde (patch) | |
tree | 50f3083ee6259d5aba57041388e0343945ac4007 | |
parent | 309961138b1ebfa78e0f2b6201e06bae64c57e0d (diff) | |
download | tor-0cd72a28339e829443f142743bbc1bd8ede0fbde.tar.gz tor-0cd72a28339e829443f142743bbc1bd8ede0fbde.zip |
core/mainloop: more comments documenting connection.c
-rw-r--r-- | src/core/mainloop/connection.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c index 95213f5505..a0902f5164 100644 --- a/src/core/mainloop/connection.c +++ b/src/core/mainloop/connection.c @@ -3571,7 +3571,8 @@ connection_buf_read_from_socket(connection_t *conn, ssize_t *max_to_read, * waiting for a TLS renegotiation, the renegotiation started, and * SSL_read returned WANTWRITE. But now SSL_read is saying WANTREAD * again. Stop waiting for write events now, or else we'll - * busy-loop until data arrives for us to read. */ + * busy-loop until data arrives for us to read. + * XXX: remove this when v2 handshakes support is dropped. */ connection_stop_writing(conn); if (!connection_is_reading(conn)) connection_start_reading(conn); @@ -4028,6 +4029,9 @@ connection_handle_write(connection_t *conn, int force) { int res; update_current_time(time(NULL)); + /* connection_handle_write_impl() might call connection_handle_read() + * if we're in the middle of a v2 handshake, in which case it needs this + * flag set. */ conn->in_connection_handle_write = 1; res = connection_handle_write_impl(conn, force); conn->in_connection_handle_write = 0; |