From: Zachary Sailer Date: Sun, 9 Jun 2019 21:15:31 +0000 (-0700) Subject: iostream: check that stream is open before trying to read (#2670) X-Git-Tag: v6.0.3^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12094c3b4626dbc25aaa7d41eeed2de2c1f27a7f;p=thirdparty%2Ftornado.git iostream: check that stream is open before trying to read (#2670) --- diff --git a/tornado/iostream.py b/tornado/iostream.py index 6ea748a54..ee305922d 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -794,6 +794,7 @@ class BaseIOStream(object): self._read_from_buffer(pos) def _start_read(self) -> Future: + self._check_closed() # Before reading, check that stream is not closed. assert self._read_future is None, "Already reading" self._read_future = Future() return self._read_future