mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 15:23:27 +01:00
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.
This commit is contained in:
parent
fbacbf9fd9
commit
5710d99f00
@ -914,9 +914,12 @@ connection_tls_start_handshake(or_connection_t *conn, int receiving)
|
|||||||
if (conn->bucket_cfg)
|
if (conn->bucket_cfg)
|
||||||
bufferevent_set_rate_limit(conn->_base.bufev, conn->bucket_cfg);
|
bufferevent_set_rate_limit(conn->_base.bufev, conn->bucket_cfg);
|
||||||
connection_enable_rate_limiting(TO_CONN(conn));
|
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_handle_write_cb,
|
||||||
connection_or_handle_event_cb,
|
connection_or_handle_event_cb,/* overriding this one*/
|
||||||
TO_CONN(conn));
|
TO_CONN(conn));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user