Skip to content
This repository
Browse code

Fix the IOStream close callback not getting called if there are pendi…

…ng callbacks.

_maybe_add_error_listener only does anything if _state is None.
  • Loading branch information...
commit 96f057c3cdc00899dbdf6364b00b3b2f1b4cea96 1 parent 468d37c
Florian Diebold authored September 04, 2011

Showing 1 changed file with 1 addition and 0 deletions. Show diff stats Hide diff stats

  1. 1  tornado/iostream.py
1  tornado/iostream.py
@@ -224,6 +224,7 @@ def close(self):
224 224
                                    self._consume(self._read_buffer_size))
225 225
             if self._state is not None:
226 226
                 self.io_loop.remove_handler(self.socket.fileno())
  227
+                self._state = None
227 228
             self.socket.close()
228 229
             self.socket = None
229 230
             if self._close_callback and self._pending_callbacks == 0:

0 notes on commit 96f057c

Please sign in to comment.
Something went wrong with that request. Please try again.