Commits

Alex Gaynor committed 10eb72c

Fix for SSLSocket.makefile()

Test program:

pypy -c "import socket, ssl; s = ssl.wrap_socket(socket.create_connection(('pypi.python.org', 443))); s.makefile().close(); print s.fileno()"
(transplanted from 963c6d6d7d6c8cb32d1e338ef620e9edd9e479fa)

Comments (0)

Files changed (1)

lib-python/2.7/socket.py

             s = self._sock
             self._sock = None
             if s is not None:
-                s._drop()
                 if self._close:
                     s.close()
+                else:
+                    s._drop()
 
     def __del__(self):
         try: