Merge pull request #670 from ticosax/set-exit-code-on-error
In case of error when starting sanic
This commit is contained in:
commit
c35721abbd
|
@ -574,6 +574,7 @@ class Sanic:
|
||||||
except:
|
except:
|
||||||
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")
|
||||||
|
|
|
@ -522,5 +522,3 @@ def serve_multiple(server_settings, workers):
|
||||||
for process in processes:
|
for process in processes:
|
||||||
process.terminate()
|
process.terminate()
|
||||||
server_settings.get('sock').close()
|
server_settings.get('sock').close()
|
||||||
|
|
||||||
asyncio.get_event_loop().stop()
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user