]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Check for ECONNRESET in addition to EPIPE on send().
authorBen Darnell <ben@bendarnell.com>
Sun, 12 May 2013 20:24:19 +0000 (16:24 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 12 May 2013 20:24:19 +0000 (16:24 -0400)
ECONNRESET appears to be the error code used here on Windows.

Closes #757.
Closes #758.

tornado/iostream.py

index 8545fcf4af556cddf053d77d1549f52be008472a..40493c6c6d8bbe49824bb508e5d66088596143b9 100644 (file)
@@ -547,7 +547,7 @@ class BaseIOStream(object):
                     self._write_buffer_frozen = True
                     break
                 else:
-                    if e.args[0] != errno.EPIPE:
+                    if e.args[0] not in (errno.EPIPE, errno.ECONNRESET):
                         # Broken pipe errors are usually caused by connection
                         # reset, and its better to not log EPIPE errors to
                         # minimize log spam