fix abend

This commit is contained in:
Tim Bentley 2017-12-02 09:11:22 +00:00
parent 873a8ada90
commit 90118af85c
3 changed files with 17 additions and 16 deletions

View File

@ -82,6 +82,7 @@ class HttpServer(RegistryBase, RegistryProperties, LogMixin):
Initialise the http server, and start the http server
"""
super(HttpServer, self).__init__(parent)
if Registry().get_flag('no_web_server'):
self.worker = HttpWorker()
self.thread = QtCore.QThread()
self.worker.moveToThread(self.thread)

View File

@ -70,6 +70,7 @@ class WebSocketServer(RegistryProperties, LogMixin):
Initialise and start the WebSockets server
"""
super(WebSocketServer, self).__init__()
if Registry().get_flag('no_web_server'):
self.settings_section = 'api'
self.worker = WebSocketWorker(self)
self.thread = QtCore.QThread()

View File

@ -504,7 +504,6 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow, RegistryProperties):
Settings().set_up_default_values()
self.about_form = AboutForm(self)
MediaController()
if Registry().get_flag('no_web_server'):
websockets.WebSocketServer()
server.HttpServer()
SettingsForm(self)