]> git.ipfire.org Git - thirdparty/tornado.git/commit
Correctly handle EAGAIN when writing to PipeIOStreams 851/head
authorBen Dyer <ben.dyer@taguchimail.com>
Fri, 12 Jul 2013 06:35:09 +0000 (16:35 +1000)
committerBen Dyer <ben.dyer@taguchimail.com>
Fri, 12 Jul 2013 06:35:09 +0000 (16:35 +1000)
commit11236e77c20d883b363aebea3d6341d296ed94ce
tree61ae8619c111502d6375f954d84592ae2614e719
parent6ccd3aef27bb3f5cf8c2986dfe80ced1c6abe360
Correctly handle EAGAIN when writing to PipeIOStreams

BaseIOStream._handle_write needs to catch IOError and OSError as
well as socket.error in order to handle EAGAIN when writing to a
PipeIOStream (which doesn't appear to raise socket.error when the
buffer is full).

This also provides consistency with the exceptions caught by
BaseIOStream._read_to_buffer.
tornado/iostream.py
tornado/test/iostream_test.py