03-unknown.patch 603 B

123456789101112
  1. --- contrib/python/tornado/tornado-4/tornado/gen.py (index)
  2. +++ contrib/python/tornado/tornado-4/tornado/gen.py (working tree)
  3. @@ -914,7 +914,8 @@ def with_timeout(timeout, future, io_loop=None, quiet_exceptions=()):
  4. future, exc_info=True)
  5. def timeout_callback():
  6. - result.set_exception(TimeoutError("Timeout"))
  7. + if not result.done():
  8. + result.set_exception(TimeoutError("Timeout"))
  9. # In case the wrapped future goes on to fail, log it.
  10. future.add_done_callback(error_callback)
  11. timeout_handle = io_loop.add_timeout(