From fbd1a8fb95d1d24acd100426077c37d6f77e497b Mon Sep 17 00:00:00 2001 From: Zachary Sailer Date: Sun, 9 Jun 2019 14:15:31 -0700 Subject: [PATCH] iostream: check that stream is open before trying to read (#2670) --- tornado/iostream.py | 1 + 1 file changed, 1 insertion(+) 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 -- 2.47.2