Don't double-check _stop_pending flag

could cause spurious raises of Timeout errors
This commit is contained in:
Min RK
2018-04-09 15:58:39 +02:00
parent 151acd5bec
commit 7e3fa8c38d

View File

@@ -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