diff options
author | Roger Dingledine <arma@torproject.org> | 2005-03-23 23:19:18 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-03-23 23:19:18 +0000 |
commit | 0dc91fd9c019476e9eb1633ceb881c7527f3f76b (patch) | |
tree | 5ca5f9538d4363ce959433617d2774b35acad410 /src/or/connection.c | |
parent | fb8a319ffe2d699aa1ba8234017e11fe68f92253 (diff) | |
download | tor-0dc91fd9c019476e9eb1633ceb881c7527f3f76b.tar.gz tor-0dc91fd9c019476e9eb1633ceb881c7527f3f76b.zip |
fix an assert -- we're not allowed to write onto a conn after we've
connection_unregistered it. there's still more work to be done here,
since we need to make sure to send back the socks-reply as soon as we
know what it will be -- we can't just wait until connection-about-to-close
to deal with it.
svn:r3847
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index b45c0bd475..81e42236c1 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -279,11 +279,9 @@ void connection_about_to_close_connection(connection_t *conn) break; case CONN_TYPE_AP: if (conn->socks_request->has_finished == 0) { - log_fn(LOG_INFO,"Cleaning up AP -- sending socks reject."); - conn->hold_open_until_flushed = 1; - /* XXX this socks_reply never gets sent, since conn - * gets removed right after this function finishes. */ - connection_ap_handshake_socks_reply(conn, NULL, 0, SOCKS5_GENERAL_ERROR); + /* since conn gets removed right after this function finishes, + * there's no point trying to send back a reply at this point. */ + log_fn(LOG_INFO,"Bug: Closing stream without sending back a socks reply."); } else { control_event_stream_status(conn, STREAM_EVENT_CLOSED); } |