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 <>
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)
client = create_connection(server.server_address)
server.shutdown()  # Ensure server has closed client connection

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