[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #16355 [Torsocks]: [PATCH] Add usleep to data_impl functions
#16355: [PATCH] Add usleep to data_impl functions
-------------------------------------+-------------------------
Reporter: cypherpunks | Owner: dgoulet
Type: enhancement | Status: new
Priority: trivial | Milestone:
Component: Torsocks | Version:
Keywords: torsocks cpu spike hang | Actual Points:
Parent ID: | Points:
-------------------------------------+-------------------------
The send_data_impl and recv_data_impl functions can enter an annoying
busy loop if a connection is laggy. Potentially if the connection
never establishes, this can continue for minutes, until the connection
times out, having at least one core running at 100% the entire time,
which is undesirable.
Adding a usleep(1000) is enough to make sure a torsocks'd program
doesn't 100% the CPU, and the user likely will not notice a 0.001
second delay.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16355>
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