From 7e3fa8c38d30f83c5e2d1bfbca27d147358879f6 Mon Sep 17 00:00:00 2001 From: Min RK Date: Mon, 9 Apr 2018 15:58:39 +0200 Subject: [PATCH] Don't double-check _stop_pending flag could cause spurious raises of Timeout errors --- jupyterhub/handlers/base.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/jupyterhub/handlers/base.py b/jupyterhub/handlers/base.py index c25ffcd5..8ec720e4 100644 --- a/jupyterhub/handlers/base.py +++ b/jupyterhub/handlers/base.py @@ -697,11 +697,8 @@ class BaseHandler(RequestHandler): try: await gen.with_timeout(timedelta(seconds=self.slow_stop_timeout), stop()) except gen.TimeoutError: - if spawner._stop_pending: - # hit timeout, but stop is still pending - self.log.warning("User %s:%s server is slow to stop", user.name, name) - else: - raise + # hit timeout, but stop is still pending + self.log.warning("User %s:%s server is slow to stop", user.name, name) #--------------------------------------------------------------- # template rendering