Skip to content

Commit

Permalink
Wrap app.run_server in try except.
Browse files Browse the repository at this point in the history
  • Loading branch information
T4rk1n committed Mar 18, 2022
1 parent e19dc6d commit 13733f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dash/testing/application_runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ def run():
kwargs["port"] = self.port
else:
self.port = kwargs["port"]
app.run_server(threaded=True, **kwargs)

try:
app.run_server(threaded=True, **kwargs)
except SystemExit:
logger.info("Server stopped")

self.thread = StoppableThread(target=run)
self.thread.daemon = True
Expand Down

0 comments on commit 13733f5

Please sign in to comment.