[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [chutney/master] Report "successfully connected" at most once.
commit dc66b42be6a19cb5bb31ee1108c7d8a3c769491a
Author: Linus Nordberg <linus@xxxxxxxxxxxxxx>
Date: Wed Jun 5 15:48:57 2013 +0200
Report "successfully connected" at most once.
---
lib/chutney/Traffic.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/chutney/Traffic.py b/lib/chutney/Traffic.py
index efee8e2..694cd87 100644
--- a/lib/chutney/Traffic.py
+++ b/lib/chutney/Traffic.py
@@ -151,6 +151,7 @@ class Source(Peer):
self.state = self.CONNECTED
self.inbuf = ''
self.outbuf = self.data
+ debug("successfully connected (fd=%d)" % self.fd())
else:
debug("proxy handshake failed (0x%x)! (fd=%d)" %
(ord(self.inbuf[1]), self.fd()))
@@ -171,6 +172,7 @@ class Source(Peer):
if self.proxy is None:
self.state = self.CONNECTED
self.outbuf = self.data
+ debug("successfully connected (fd=%d)" % self.fd())
else:
self.state = self.CONNECTING_THROUGH_PROXY
self.outbuf = socks_cmd(self.dest)
@@ -182,7 +184,6 @@ class Source(Peer):
return -1
raise
self.outbuf = self.outbuf[n:]
- debug("successfully connected (fd=%d)" % self.fd())
if self.state == self.CONNECTING_THROUGH_PROXY:
return 1 # Keep us around.
return len(self.outbuf) # When 0, we're being removed.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits