Permalink
Browse files

Connection errors can happen here too.

  • Loading branch information...
1 parent 3309419 commit 9118028671e3b3eee50f7f78967762018cf4fba9 @bdarnell bdarnell committed May 27, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 tornado/iostream.py
View
@@ -499,6 +499,7 @@ def _read_from_buffer(self):
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

0 comments on commit 9118028

Please sign in to comment.