Skip to content
Snippets Groups Projects
Unverified Commit d74f27b7 authored by drebs's avatar drebs
Browse files

[bug] log and exit on server startup errors

Some errors during server startup could leave the server in a zombie
state (running, but not listening). This commit makes sure the server
stops if errors occur during deferreds created on server startup.

Closes #8997.
parent 642541e2
Branches
Tags
1 merge request!161Fixes for server test fixture and startup
......@@ -39,6 +39,12 @@ def _exit(status):
reactor.stop()
def _log_and_exit(failure):
logger.error('Error while starting up server: %r'
% failure.getErrorMessage())
_exit(20)
#
# necessary checks
#
......@@ -124,6 +130,7 @@ def run(application):
d = check_schema_versions(conf['couch_url'])
d.addCallback(lambda _: create_services(local_port, public_port,
application))
d.addErrback(_log_and_exit)
application = service.Application('soledad-server')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment