http: Log errors instead of dying for HTTP startup.
This commit is contained in:
parent
b6cf86c6a2
commit
9a2f8a3e4f
@ -69,6 +69,11 @@ v0.20.0 (UNRELEASED)
|
||||
make sense for a server such as Mopidy. Currently the only way to find out if
|
||||
it is in use and will be missed is to go ahead and remove it.
|
||||
|
||||
**HTTP**
|
||||
|
||||
- Log error while starting HTTP apps instead letting the HTTP server thread
|
||||
die. (Fixes: :issue:`875`)
|
||||
|
||||
|
||||
v0.19.5 (UNRELEASED)
|
||||
====================
|
||||
|
||||
@ -129,11 +129,16 @@ class HttpServer(threading.Thread):
|
||||
def _get_app_request_handlers(self):
|
||||
result = []
|
||||
for app in self.apps:
|
||||
try:
|
||||
request_handlers = app['factory'](self.config, self.core)
|
||||
except Exception:
|
||||
logger.exception('Loading %s failed.', app['name'])
|
||||
continue
|
||||
|
||||
result.append((
|
||||
r'/%s' % app['name'],
|
||||
handlers.AddSlashHandler
|
||||
))
|
||||
request_handlers = app['factory'](self.config, self.core)
|
||||
for handler in request_handlers:
|
||||
handler = list(handler)
|
||||
handler[0] = '/%s%s' % (app['name'], handler[0])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user