From 4c19333132ec568eb881401a47ab83db4a3cae2a Mon Sep 17 00:00:00 2001 From: Eden Li Date: Wed, 30 May 2012 17:32:29 -0700 Subject: [PATCH] Restore context for all read methods. Prior to 2db0aceb32f5c042f5306e72a4679580b4359f34 this was being done properly, but the refactor removed stack_context.wrap causing some issues in our upstream context managers. --- tornado/iostream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tornado/iostream.py b/tornado/iostream.py index 47e981b4..6db0fdfc 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -366,7 +366,7 @@ class IOStream(object): def _set_read_callback(self, callback): assert not self._read_callback, "Already reading" - self._read_callback = callback + self._read_callback = stack_context.wrap(callback) def _try_inline_read(self): """Attempt to complete the current read operation from buffered data.