From: Ben Darnell Date: Sun, 27 May 2012 22:09:52 +0000 (-0700) Subject: Connection errors can happen here too. X-Git-Tag: v2.3.0~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9118028671e3b3eee50f7f78967762018cf4fba9;p=thirdparty%2Ftornado.git Connection errors can happen here too. --- diff --git a/tornado/iostream.py b/tornado/iostream.py index df1f27f67..927dc92c2 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -499,6 +499,7 @@ class IOStream(object): def _handle_connect(self): err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) if err != 0: + self.error = socket.error(err, os.strerror(err)) # IOLoop implementations may vary: some of them return # an error state before the socket becomes writable, so # in that case a connection failure would be handled by the