From 9118028671e3b3eee50f7f78967762018cf4fba9 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sun, 27 May 2012 15:09:52 -0700 Subject: [PATCH] Connection errors can happen here too. --- tornado/iostream.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tornado/iostream.py b/tornado/iostream.py index df1f27f6..927dc92c 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