mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix start server button in preferences causing a hang if the server fails to start
This commit is contained in:
parent
7c3e05313d
commit
03226f2d34
@ -798,6 +798,7 @@ class ConfigWidget(ConfigWidgetBase):
|
||||
_('Failed to start content server'),
|
||||
as_unicode(self.gui.content_server.exception)
|
||||
).exec_()
|
||||
self.gui.content_server = None
|
||||
return
|
||||
self.main_tab.update_button_state()
|
||||
finally:
|
||||
|
@ -64,6 +64,7 @@ class Server(object):
|
||||
self.loop.initialize_socket()
|
||||
except Exception as e:
|
||||
self.loop = None
|
||||
self.exception = e
|
||||
if self.start_failure_callback is not None:
|
||||
try:
|
||||
self.start_failure_callback(as_unicode(e))
|
||||
@ -86,6 +87,7 @@ class Server(object):
|
||||
from calibre.utils.rapydscript import compile_srv
|
||||
compile_srv()
|
||||
except BaseException as e:
|
||||
self.exception = e
|
||||
if self.start_failure_callback is not None:
|
||||
try:
|
||||
self.start_failure_callback(as_unicode(e))
|
||||
|
Loading…
x
Reference in New Issue
Block a user