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 asvetlov, martin.panter, serhiy.storchaka
Date 2015-01-18.23:59:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1421625542.38.0.52747235435.issue16648@psf.upfronthosting.co.za>
In-reply-to
Content
I would support adding ENOTCONN under the ConnectionError umbrella. It is caught for shutdown() calls in a few standard library modules. Here is a demo showing how to trigger it (at least on Linux):

from socket import create_connection, SHUT_RDWR
from socketserver import TCPServer, BaseRequestHandler
from threading import Thread

server = TCPServer(("", 0), BaseRequestHandler)
Thread(target=server.serve_forever).start()
client = create_connection(server.server_address)
server.shutdown()  # Ensure server has closed client connection
server.server_close()
client.send(bytes(1))

>>> client.shutdown(SHUT_RDWR)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 107] Transport endpoint is not connected
History
Date User Action Args
2015-01-18 23:59:02martin.pantersetrecipients: + martin.panter, asvetlov, serhiy.storchaka
2015-01-18 23:59:02martin.pantersetmessageid: <1421625542.38.0.52747235435.issue16648@psf.upfronthosting.co.za>
2015-01-18 23:59:02martin.panterlinkissue16648 messages
2015-01-18 23:59:02martin.pantercreate