Author David Robertson
Recipients David Robertson, Drekin, Kimmo.Parviainen-Jalanko, akuchling, asvetlov, gvanrossum, steve.dower, tim.golden, vstinner, yselivanov, zach.ware
Date 2015-07-07.16:27:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1436286454.7.0.836196109559.issue23057@psf.upfronthosting.co.za>
In-reply-to
Content
Dear all, I have just been trying to understand the TCP Echo example from the asyncio documentation:
https://docs.python.org/3/library/asyncio-protocol.html#protocol-examples
I copied the two examples from the docs into `server.py' and `client.py'. I ran server.py first and hit control-C. This did not close the server as expected. However, if I then ran client.py, the act of sending a message to the server seemed to prompt it to receive the KeyboardInterrupt and close! In turn this caused an OSError to be raised by the client.

Some searching lead me to StackOverflow and then to this bug. I wanted to point out this behaviour, as I didn't see it mentioned in any of the previous comments. Plus, I thought it was a shame that the first example I looked didn't behave as described!

I'm curently running Python 3.3.1 on Windows 7 and I'm using asyncio 3.4.3 from PyPI.
History
Date User Action Args
2015-07-07 16:27:34David Robertsonsetrecipients: + David Robertson, gvanrossum, akuchling, vstinner, tim.golden, asvetlov, zach.ware, yselivanov, Drekin, steve.dower, Kimmo.Parviainen-Jalanko
2015-07-07 16:27:34David Robertsonsetmessageid: <1436286454.7.0.836196109559.issue23057@psf.upfronthosting.co.za>
2015-07-07 16:27:34David Robertsonlinkissue23057 messages
2015-07-07 16:27:34David Robertsoncreate