From: chengkang <1412950785@qq.com> Date: Fri, 20 Jul 2018 08:53:05 +0000 (+0800) Subject: fix issue #2448 X-Git-Tag: v6.0.0b1~44^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6da8b6fe7bd8ac26c251092f1d764ffa6fe655f;p=thirdparty%2Ftornado.git fix issue #2448 --- diff --git a/tornado/http1connection.py b/tornado/http1connection.py index 0002f857b..e2b4c787e 100644 --- a/tornado/http1connection.py +++ b/tornado/http1connection.py @@ -399,7 +399,7 @@ class HTTP1Connection(httputil.HTTPConnection): if chunk: data += self._format_chunk(chunk) self._pending_write = self.stream.write(data) - self._pending_write.add_done_callback(self._on_write_complete) + future_add_done_callback(self._pending_write, self._on_write_complete) return future def _format_chunk(self, chunk):