diff --git a/voila/app.py b/voila/app.py index 1058d2760..352cc5e12 100644 --- a/voila/app.py +++ b/voila/app.py @@ -451,8 +451,6 @@ def start(self): ]) self.app.add_handlers('.*$', handlers) - if self.open_browser: - self.launch_browser() self.listen() def stop(self): @@ -463,6 +461,9 @@ def listen(self): self.app.listen(self.port) self.log.info('Voila is running at:\n%s' % self.display_url) + if self.open_browser: + self.launch_browser() + self.ioloop = tornado.ioloop.IOLoop.current() try: self.ioloop.start()