wies war
This commit is contained in:
parent
2a67fb36e7
commit
0abbe41473
@ -238,10 +238,8 @@ async def websworker(websocket, path):
|
||||
try:
|
||||
await websocket.send(state_event())
|
||||
while True:
|
||||
try:
|
||||
|
||||
# waiting for a new message received on the websocket
|
||||
message = await asyncio.wait_for(websocket.recv(), timeout=0.1)
|
||||
# waiting for a new message resceived on the websocket
|
||||
message = await websocket.recv()
|
||||
|
||||
# split message from multiple commands in one string
|
||||
data = message.split(";")
|
||||
@ -275,6 +273,10 @@ async def websworker(websocket, path):
|
||||
print("DMX value for channel " + act[0] + " changed to " + act[1])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# It does not look like we have a dmx key-value, so we have to process the command
|
||||
except Exception:
|
||||
|
||||
@ -288,7 +290,6 @@ async def websworker(websocket, path):
|
||||
else:
|
||||
print("received message, but can not handle: ", act)
|
||||
|
||||
|
||||
finally:
|
||||
await unregister(websocket)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user