[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #4626 [Tor Directory Authority]: Very high cpu usage for gabelmoo running master
#4626: Very high cpu usage for gabelmoo running master
-------------------------------------+--------------------------------------
Reporter: Sebastian | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: Tor: 0.2.3.x-final
Component: Tor Directory Authority | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------------------+--------------------------------------
Comment(by Sebastian):
lalelu, to keep trac updated:
wanoskarnet and asn have been chatting, and had another idea which seems
to not be the problem:
{{{
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 1205599..a768634 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -1629,14 +1629,17 @@ tor_tls_read(tor_tls_t *tls, char *cp, size_t len)
#ifdef V2_HANDSHAKE_SERVER
if (tls->got_renegotiate) {
- tor_assert(tls->server_handshake_count == 2);
- /* XXX tor_assert(err == TOR_TLS_WANTREAD); */
-
- /* Renegotiation happened! */
- log_info(LD_NET, "Got a TLS renegotiation from %s", ADDR(tls));
- if (tls->negotiated_callback)
- tls->negotiated_callback(tls, tls->callback_arg);
- tls->got_renegotiate = 0;
+ if ((err == TOR_TLS_WANTREAD) || (err == TOR_TLS_WANTWRITE)) {
+
+ tor_assert(tls->server_handshake_count == 2);
+ /* XXX tor_assert(err == TOR_TLS_WANTREAD); */
+
+ /* Renegotiation happened! */
+ log_info(LD_NET, "Got a TLS renegotiation from %s", ADDR(tls));
+ if (tls->negotiated_callback)
+ tls->negotiated_callback(tls, tls->callback_arg);
+ tls->got_renegotiate = 0;
+ }
}
#endif
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4626#comment:16>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs