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.

classification
Title: socket._decref_socketios and close
Type: Stage:
Components: Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: giampaolo.rodola, janssen, r.david.murray
Priority: normal Keywords:

Created on 2012-05-15 23:41 by giampaolo.rodola, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg160777 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2012-05-15 23:41
Don't know the details but this condition looks wrong:
http://hg.python.org/cpython/file/cdcc816dea85/Lib/socket.py#l190
msg160778 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-05-15 23:53
Mostly likely it is correct.  Looking at the definition of close, it is calling "_real_close" when the _io_refs count drops to zero, and _decref_socketios is decrementing that counter.  So the logic is "if we have been closed, see if it is time to close the socket yet".
msg160866 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2012-05-16 14:05
You are right. I should have looked more carefully. =)
History
Date User Action Args
2022-04-11 14:57:30adminsetgithub: 59025
2012-05-16 14:05:53giampaolo.rodolasetstatus: open -> closed
resolution: not a bug
messages: + msg160866
2012-05-15 23:53:34r.david.murraysetnosy: + r.david.murray
messages: + msg160778
2012-05-15 23:41:37giampaolo.rodolacreate