diff options
author | Linus Nordberg <linus@torproject.org> | 2013-06-05 15:48:57 +0200 |
---|---|---|
committer | Linus Nordberg <linus@torproject.org> | 2013-06-18 12:59:23 +0200 |
commit | dc66b42be6a19cb5bb31ee1108c7d8a3c769491a (patch) | |
tree | 6e0e1a157d0766c943c64429919876e5bc697aa8 | |
parent | c987c77d183b462c3b960039abca020ad43b5133 (diff) | |
download | chutney-dc66b42be6a19cb5bb31ee1108c7d8a3c769491a.tar chutney-dc66b42be6a19cb5bb31ee1108c7d8a3c769491a.tar.gz |
Report "successfully connected" at most once.
-rw-r--r-- | lib/chutney/Traffic.py | 3 |
1 files changed, 2 insertions, 1 deletions
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. |