In case of error when starting sanic
Don't exit with code 0
This commit is contained in:
parent
5f94f65f4f
commit
8b13e103fd
|
@ -570,9 +570,10 @@ class Sanic:
|
|||
serve(**server_settings)
|
||||
else:
|
||||
serve_multiple(server_settings, workers)
|
||||
except:
|
||||
except Exception:
|
||||
log.exception(
|
||||
'Experienced exception while trying to serve')
|
||||
raise
|
||||
finally:
|
||||
self.is_running = False
|
||||
log.info("Server Stopped")
|
||||
|
|
Loading…
Reference in New Issue
Block a user