From bf0d6be34c3efab2cf97eb1411d2c4d3e13fe78f Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Mon, 11 Oct 2010 01:56:37 +0000 Subject: Debugging tweaks svn path=/rpkid/rpki/http.py; revision=3477 --- rpkid/rpki/http.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rpkid/rpki/http.py') diff --git a/rpkid/rpki/http.py b/rpkid/rpki/http.py index f1fbd9a7..829af063 100644 --- a/rpkid/rpki/http.py +++ b/rpkid/rpki/http.py @@ -652,9 +652,11 @@ class http_client(http_stream): """ try: self.af, self.address = random.choice(addrinfo) - self.log("Connecting to AF %r sockaddr %r" % (self.af, self.address)) + self.log("Connecting to AF %s host %s port %s addr %s" % (self.af, self.host, self.port, self.address)) self.create_socket(self.af, socket.SOCK_STREAM) self.connect((self.address, self.port)) + if self.addr is None: + self.addr = (self.host, self.port) except (rpki.async.ExitNow, SystemExit): raise except: @@ -666,6 +668,7 @@ class http_client(http_stream): """ self.log("Socket connected") self.set_state("idle") + assert self.queue.client is self self.queue.send_request() def set_state(self, state): -- cgit v1.2.3