Store if UiServer is running
This commit is contained in:
parent
43b68faf73
commit
996f326c74
1 changed files with 3 additions and 0 deletions
|
@ -57,6 +57,7 @@ class UiServer:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.ip = config.ui_ip
|
self.ip = config.ui_ip
|
||||||
self.port = config.ui_port
|
self.port = config.ui_port
|
||||||
|
self.running = False
|
||||||
if self.ip == "*":
|
if self.ip == "*":
|
||||||
self.ip = "0.0.0.0" # Bind all
|
self.ip = "0.0.0.0" # Bind all
|
||||||
if config.ui_host:
|
if config.ui_host:
|
||||||
|
@ -118,6 +119,7 @@ class UiServer:
|
||||||
|
|
||||||
# Bind and run the server
|
# Bind and run the server
|
||||||
def start(self):
|
def start(self):
|
||||||
|
self.running = True
|
||||||
handler = self.handleRequest
|
handler = self.handleRequest
|
||||||
|
|
||||||
if config.debug:
|
if config.debug:
|
||||||
|
@ -189,6 +191,7 @@ class UiServer:
|
||||||
|
|
||||||
self.server.socket.close()
|
self.server.socket.close()
|
||||||
self.server.stop()
|
self.server.stop()
|
||||||
|
self.running = False
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
def updateWebsocket(self, **kwargs):
|
def updateWebsocket(self, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue