aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-10-12 15:48:17 -0400
committerNick Mathewson <nickm@torproject.org>2010-10-12 15:48:17 -0400
commit5710d99f00b3ac7cef0691fc9153993b0f4aa872 (patch)
tree43da81b138e1800c9544764e5d230e0a4f9fb56c /src/or/connection_or.c
parentfbacbf9fd92a7f10a86a314b20d34f609fb1e72f (diff)
downloadtor-5710d99f00b3ac7cef0691fc9153993b0f4aa872.tar.gz
tor-5710d99f00b3ac7cef0691fc9153993b0f4aa872.zip
Remember to re-install inbuf/outbuf callbacks on ssl bufferevents
If we don't, we will (among other bad things) never update lastread/lastwritten, and so flood the network with keepalives.
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index d63cce6519..a60d4374e1 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -914,9 +914,12 @@ connection_tls_start_handshake(or_connection_t *conn, int receiving)
if (conn->bucket_cfg)
bufferevent_set_rate_limit(conn->_base.bufev, conn->bucket_cfg);
connection_enable_rate_limiting(TO_CONN(conn));
- bufferevent_setcb(b, connection_handle_read_cb,
+
+ connection_configure_bufferevent_callbacks(TO_CONN(conn));
+ bufferevent_setcb(b,
+ connection_handle_read_cb,
connection_handle_write_cb,
- connection_or_handle_event_cb,
+ connection_or_handle_event_cb,/* overriding this one*/
TO_CONN(conn));
}
#endif