Martin Panter added the comment:

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

----------
nosy: +vadmium

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16648>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to