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:
|
||||
log.exception(
|
||||
'Experienced exception while trying to serve')
|
||||
raise
|
||||
finally:
|
||||
self.is_running = False
|
||||
log.info("Server Stopped")
|
||||
|
|
|
@ -522,5 +522,3 @@ def serve_multiple(server_settings, workers):
|
|||
for process in processes:
|
||||
process.terminate()
|
||||
server_settings.get('sock').close()
|
||||
|
||||
asyncio.get_event_loop().stop()
|
||||
|
|
Loading…
Reference in New Issue
Block a user