[tor-bugs] #16355 [Torsocks]: [PATCH] Add usleep to data_impl functions

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jun 12 00:55:07 UTC 2015


#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


More information about the tor-bugs mailing list