[issue9211] Cannot close socket after ssl handshake failed
Christian Hager
report at bugs.python.org
Fri Jul 9 11:51:49 CEST 2010
Christian Hager <metakaram at gmail.com> added the comment:
Sorry for posting that issue -- I was able to solve it with newsock.shutdown(socket.SHUT_WR) ("newsock.shutdown(socket.SHUT_RD)" doesn't work for that).
# SSL Setup
try:
sslsock = ssl.wrap_socket(newsock, server_side=True, certfile="../cert.pem", keyfile="../cert.pem")
CONNECTION_LIST.append(sslsock)
except:
print "ssl handshake failed"
newsock.shutdown(socket.SHUT_WR)
newsock.close()
----------
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9211>
_______________________________________
More information about the Python-bugs-list
mailing list