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 sebastien.bourdeauducq
Recipients gvanrossum, sebastien.bourdeauducq, vstinner, yselivanov
Date 2015-10-19.14:12:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
1. Open a listening socket:
$ nc6 -l -p 1066

2. Run the following (tested here on Linux):
import asyncio

async def bug():
    reader, writer = await asyncio.open_connection("::1", "1066")
    while True:
        await writer.drain()
        # Uncommenting this makes drain() raise BrokenPipeError
        # when the server closes the connection.
        #await asyncio.sleep(0.1)

loop = asyncio.get_event_loop()

3. Terminate netcat with Ctrl-C. The program will go on a endless loop of "socket.send() raised exception." as writer.drain() fails to raise an exception to report the closed connection. Reducing the output rate of the program by using asyncio.sleep causes writer.drain() to raise BrokenPipeError (and shouldn't it be ConnectionResetError?)
Date User Action Args
2015-10-19 14:12:10sebastien.bourdeauducqsetrecipients: + sebastien.bourdeauducq, gvanrossum, vstinner, yselivanov
2015-10-19 14:12:10sebastien.bourdeauducqsetmessageid: <>
2015-10-19 14:12:09sebastien.bourdeauducqlinkissue25441 messages
2015-10-19 14:12:09sebastien.bourdeauducqcreate