From 4616e42ca6f181f15587ffbe49eb8f280ca94f5c Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 6 Mar 2015 16:28:31 -0800 Subject: [PATCH] die on failed startup when init, start were made async, the eventloop would continue to run after an exception --- jupyterhub/app.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jupyterhub/app.py b/jupyterhub/app.py index 269b3dc2..90a6a8fd 100644 --- a/jupyterhub/app.py +++ b/jupyterhub/app.py @@ -1011,8 +1011,12 @@ class JupyterHub(Application): @gen.coroutine def launch_instance_async(self, argv=None): - yield self.initialize(argv) - yield self.start() + try: + yield self.initialize(argv) + yield self.start() + except Exception as e: + self.log.exception("") + self.exit(1) @classmethod def launch_instance(cls, argv=None):