New submission from Ben Darnell <[email protected]>:

In pypy 2.1 (but not the pypy3 beta), SSLSocket.close() no longer closes the 
underlying socket.  In the attached test programs, the client should print 
"read 
from client socket: 'abc'" and "empty read; connection was closed" and then 
exit.  When the server is run with pypy 2.1 (both the final release and the 
first beta), it hangs after the first message.  The test works as expected in 
pypy 2.0, pypy3 2.1b1, and cpython.

I suspect the problem is the refcounting introduced in 
https://bitbucket.org/pypy/pypy/commits/d439d104a6051cdcc5e366b7ea329cc14d304d9e
, and specifically the call to _reuse in the socket constructor.  
ssl.wrap_socket should transfer the reference from the original plaintext 
socket 
to the ssl one instead of leaving a reference in both objects.

----------
files: test_server.py
messages: 6034
nosy: bdarnell, pypy-issue
priority: bug
status: unread
title: SSLSocket.close() doesn't work

________________________________________
PyPy bug tracker <[email protected]>
<https://bugs.pypy.org/issue1577>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to