Message253181
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:
writer.write("foo\n".encode())
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()
loop.run_until_complete(bug())
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:10 | sebastien.bourdeauducq | set | recipients:
+ sebastien.bourdeauducq, gvanrossum, vstinner, yselivanov |
2015-10-19 14:12:10 | sebastien.bourdeauducq | set | messageid: <1445263930.02.0.0288344927045.issue25441@psf.upfronthosting.co.za> |
2015-10-19 14:12:09 | sebastien.bourdeauducq | link | issue25441 messages |
2015-10-19 14:12:09 | sebastien.bourdeauducq | create | |
|