commit 01e268c7cb272bd5bb53d2f41783c16c1918461f Author: aagbsn aagbsn@extc.org Date: Tue Sep 6 14:38:01 2011 -0700
revert fix for 3798
The fix for 3798 (https://trac.torproject.org/projects/tor/ticket/3798) introduced a new error: TorCtl.Connection.close() at program exit will occasionally cause BwAuthority to hang indefinitely. This issue was originally reported in ticket 3834 (https://trac.torproject.org/projects/tor/ticket/3834)
TorCtl.Connection.close() should not be used at this time. The issue occurs when called in either atexit handlers as well as at the end of the main thread. --- NetworkScanners/BwAuthority/bwauthority_child.py | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/NetworkScanners/BwAuthority/bwauthority_child.py b/NetworkScanners/BwAuthority/bwauthority_child.py index 3aa13b2..f842843 100755 --- a/NetworkScanners/BwAuthority/bwauthority_child.py +++ b/NetworkScanners/BwAuthority/bwauthority_child.py @@ -338,11 +338,7 @@ def ignore_streams(c,hdlr): s.ignored = True hdlr.streams[s.strm_id] = s
-def cleanup(c): - if c: - c.close() - c.block_until_close() - +def cleanup(): plog("DEBUG", "Child Process Exiting...")
def setup_handler(out_dir, cookie_file): @@ -367,7 +363,7 @@ def setup_handler(out_dir, cookie_file): TorCtl.EVENT_TYPE.CIRC, TorCtl.EVENT_TYPE.STREAM_BW], True)
- atexit.register(cleanup, c) + atexit.register(cleanup) return (c,h)
def usage(argv):