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)
|
serve(**server_settings)
|
||||||
else:
|
else:
|
||||||
serve_multiple(server_settings, workers)
|
serve_multiple(server_settings, workers)
|
||||||
except:
|
except Exception:
|
||||||
log.exception(
|
log.exception(
|
||||||
'Experienced exception while trying to serve')
|
'Experienced exception while trying to serve')
|
||||||
|
raise
|
||||||
finally:
|
finally:
|
||||||
self.is_running = False
|
self.is_running = False
|
||||||
log.info("Server Stopped")
|
log.info("Server Stopped")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user