[tor-commits] [torflow/master] wait for connection to close before exiting
mikeperry at torproject.org
mikeperry at torproject.org
Thu Sep 1 01:19:50 UTC 2011
commit 09f232bffa3cf51db21c53c81e544ad977bcb335
Author: aagbsn <aagbsn at extc.org>
Date: Wed Aug 24 17:04:22 2011 -0700
wait for connection to close before exiting
TorCtl.Connection.close() doesn't block;
use TorCtl.Connection.block_until_close() to join the _eventLoop thread
---
NetworkScanners/BwAuthority/bwauthority_child.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/NetworkScanners/BwAuthority/bwauthority_child.py b/NetworkScanners/BwAuthority/bwauthority_child.py
index 4aa7607..3aa13b2 100755
--- a/NetworkScanners/BwAuthority/bwauthority_child.py
+++ b/NetworkScanners/BwAuthority/bwauthority_child.py
@@ -339,7 +339,10 @@ def ignore_streams(c,hdlr):
hdlr.streams[s.strm_id] = s
def cleanup(c):
- if c: c.close()
+ if c:
+ c.close()
+ c.block_until_close()
+
plog("DEBUG", "Child Process Exiting...")
def setup_handler(out_dir, cookie_file):
More information about the tor-commits
mailing list