Author kiilerix
Recipients docs@python, georg.brandl, kiilerix, nicdumz, pitrou
Date 2012-01-12.13:19:25
SpamBayes Score 5.16997e-08
Marked as misclassified No
Message-id <1326374366.74.0.206883959365.issue6774@psf.upfronthosting.co.za>
In-reply-to
Content
I was scared by the note in the documentation and wondered if the socket Python API was completely incapable of handling half-closed connections cross platform. pitrou helped me on IRC to track the note down to this issue.


IMO the bug report should have been rejected and the documentation patch should be removed. It shouldn't be that surprising that shutting something down that already has been shutdown (by the peer) will fail.

I don't see any indication that a "shutdown call closes the connection on the other half". It makes it half-closed as it should - and if it did anything else (which the note indicates) then it would be a big violation of BSD TCP API.

Ok, it might be slightly surprising that the next shutdown on the other end fails, but that is fully covered by "Note Some behavior may be platform dependent, since calls are made to the operating system socket APIs." It is not specific to Python in any way, AFAICT.

If anything it could just say something like "Note that shutdown of a socket that already has been shut down by the peer is platform dependent and might fail."
History
Date User Action Args
2012-01-12 13:19:26kiilerixsetrecipients: + kiilerix, georg.brandl, pitrou, nicdumz, docs@python
2012-01-12 13:19:26kiilerixsetmessageid: <1326374366.74.0.206883959365.issue6774@psf.upfronthosting.co.za>
2012-01-12 13:19:26kiilerixlinkissue6774 messages
2012-01-12 13:19:25kiilerixcreate