[tor-commits] [torflow/master] fix atexit handler to call connection.close()
mikeperry at torproject.org
mikeperry at torproject.org
Thu Sep 1 01:19:50 UTC 2011
commit 897d7c3c7cc252da7bce4a71c2a277edd2ef9ba9
Author: aagbsn <aagbsn at extc.org>
Date: Tue Aug 23 14:34:26 2011 -0700
fix atexit handler to call connection.close()
the _eventLoop thread raised an exception before bwauthority_child
exited; the new behavior is to call connection.close() in the
atexit handler.
---
NetworkScanners/BwAuthority/bwauthority_child.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/NetworkScanners/BwAuthority/bwauthority_child.py b/NetworkScanners/BwAuthority/bwauthority_child.py
index f842843..74ec257 100755
--- a/NetworkScanners/BwAuthority/bwauthority_child.py
+++ b/NetworkScanners/BwAuthority/bwauthority_child.py
@@ -338,7 +338,8 @@ def ignore_streams(c,hdlr):
s.ignored = True
hdlr.streams[s.strm_id] = s
-def cleanup():
+def cleanup(c):
+ c.close()
plog("DEBUG", "Child Process Exiting...")
def setup_handler(out_dir, cookie_file):
@@ -363,7 +364,7 @@ def setup_handler(out_dir, cookie_file):
TorCtl.EVENT_TYPE.CIRC,
TorCtl.EVENT_TYPE.STREAM_BW], True)
- atexit.register(cleanup)
+ atexit.register(cleanup, c)
return (c,h)
def usage(argv):
More information about the tor-commits
mailing list