[Twisted-Python] twisted.internet.ssl woes
Toni Andjelkovic
toni at soth.at
Mon Feb 3 12:03:23 EST 2003
Jp Calderone wrote on Mon, Feb 03 2003 (10:52:57 -0500):
> Pretty close - the inheritance structure was not-quite-correct :) It
> should be fixed now, thanks for the report and the ideas :)
It works now, thanks a lot. However, you added
ssl.Connection._closeSocket, which was already
there :-)
Index: twisted/internet/ssl.py
===================================================================
RCS file: /cvs/Twisted/twisted/internet/ssl.py,v
retrieving revision 1.36
diff -u -U1 -r1.36 ssl.py
--- twisted/internet/ssl.py 3 Feb 2003 15:39:54 -0000 1.36
+++ twisted/internet/ssl.py 3 Feb 2003 16:55:25 -0000
@@ -134,8 +134,9 @@
def _closeSocket(self):
- # For some reason, SSL.Connection's shutdown() method doesn't take a pa
rameter
+ """Called to close our socket."""
try:
- self.socket.shutdown()
+ self.socket.shutdown() # SSL_shutdown()
+ self.socket.close()
except:
- deferr.log()
-
+ log.deferr()
+
@@ -189,9 +190,2 @@
return main.CONNECTION_LOST
-
- def _closeSocket(self):
- """Called to close our socket."""
- try:
- self.socket.sock_shutdown(2)
- except socket.error:
- pass
Cheers,
--
Toni Andjelkovic
<toni at soth.at>
More information about the Twisted-Python
mailing list