[tor-commits] [chutney/master] Stop trying to use half-open connections: Tor doesn't support them

teor at torproject.org teor at torproject.org
Thu Jun 20 07:45:41 UTC 2019


commit 15dcdee6bf4516b7bb017c197c747c3308f3f8b6
Author: Nick Mathewson <nickm at torproject.org>
Date:   Sun May 12 10:42:45 2019 -0400

    Stop trying to use half-open connections: Tor doesn't support them
---
 lib/chutney/Traffic.py | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/lib/chutney/Traffic.py b/lib/chutney/Traffic.py
index f403ca0..02cca91 100755
--- a/lib/chutney/Traffic.py
+++ b/lib/chutney/Traffic.py
@@ -322,7 +322,6 @@ class Source(asynchat.async_chat):
         self.push_with_producer(self.data_source)
 
         self.push_with_producer(CloseSourceProducer(self))
-        self.close_when_done()
 
     def fileno(self):
         return self.socket.fileno()
@@ -332,18 +331,17 @@ class EchoServer(asynchat.async_chat):
         asynchat.async_chat.__init__(self, sock, map=tt.socket_map)
         self.set_terminator(None)
         self.tt = tt
+        self.am_closing = False
 
     def collect_incoming_data(self, data):
         self.push(data)
 
-    def handle_close(self):
-        self.close_when_done()
-
 class EchoClient(Source):
     def __init__(self, tt, server, proxy=None):
         Source.__init__(self, tt, server, proxy)
         self.data_checker = DataChecker(tt.data_source.copy())
         self.testname_check = uniq("check")
+        self.am_closing = False
 
     def enote(self, s):
         self.tt.tests.note(self.testname_check, s)
@@ -351,9 +349,6 @@ class EchoClient(Source):
     def get_test_names(self):
         return [ self.testname, self.testname_check ]
 
-    def handle_close(self):
-        self.close_when_done()
-
     def collect_incoming_data(self, data):
         if self.state == self.CONNECTING_THROUGH_PROXY:
             Source.collect_incoming_data(self, data)
@@ -455,7 +450,7 @@ class TrafficTester(object):
               %(self.tests.all_done(), self.tests.failure_count()))
 
         note("Status:\n%s"%self.tests.teststatus)
-        
+
         self.listener.close()
 
         return self.tests.all_done() and self.tests.failure_count() == 0





More information about the tor-commits mailing list