Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

output a peer name to log message on ssl errors

  • Loading branch information...
commit e9acb43f762d961915415d7af1ae453de01ae74d 1 parent 00688f9
@ei-grad ei-grad authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 tornado/iostream.py
View
7 tornado/iostream.py
@@ -650,7 +650,12 @@ def _do_ssl_handshake(self):
ssl.SSL_ERROR_ZERO_RETURN):
return self.close()
elif err.args[0] == ssl.SSL_ERROR_SSL:
- logging.warning("SSL Error on %d: %s", self.socket.fileno(), err)
+ try:
+ peer = self.socket.getpeername()
+ except:
+ peer = 'not connected'
+ logging.warning("SSL Error on %d %s: %s",
+ self.socket.fileno(), peer, err)
return self.close()
raise
except socket.error, err:
Please sign in to comment.
Something went wrong with that request. Please try again.