āžœ

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients GeorgeY, martin.panter
Date 2016-10-15.03:46:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1476503170.31.0.780175579109.issue28447@psf.upfronthosting.co.za>
In-reply-to
Content
This indicated to me that the socket object has indeed been closed _before_ you call getpeername():

-------------
print(sock)>>>
<socket.socket [closed] fd=-1, family=AFNET, type=SOCKSTREAM, proto=0>
sock.getpeername()>>>
OS.Error[WinError10038]an operation was attempted on something that is not a socket
=======

In this case, I think ā€œ[closed] fd=-1ā€ means that both the Python-level socket object, and all objects returned by socket.makefile(), have been closed, so the OS-level socket has probably been closed. In any case, getpeername() is probably trying the invalid file descriptor -1. If there are no copies of the OS-level socket open (e.g. in other processes), then the TCP connection is probably also shut down, but I suspect the problem is the socket object, not the TCP connection.

Without code or something demonstrating the bug, Iā€™m pretty sure it is a bug in your program, not in Python.
History
Date User Action Args
2016-10-15 03:46:10martin.pantersetrecipients: + martin.panter, GeorgeY
2016-10-15 03:46:10martin.pantersetmessageid: <1476503170.31.0.780175579109.issue28447@psf.upfronthosting.co.za>
2016-10-15 03:46:10martin.panterlinkissue28447 messages
2016-10-15 03:46:10martin.pantercreate