Fixed connection close on null reply

This commit is contained in:
nin0dev 2024-06-18 01:17:30 -04:00
parent 9111c63691
commit f419e9faf0

View file

@ -20,8 +20,8 @@ async def handle(websocket):
if message == "GET":
if EAS_MESSAGE == "":
await websocket.send("NULL")
return
await websocket.send(f"MSG {EAS_MESSAGE}")
else:
await websocket.send(f"MSG {EAS_MESSAGE}")
if message.startswith(f"MSG {TOKEN} "):
# broadcast from vee
EAS_MESSAGE = message.replace(f"MSG {TOKEN} ", "")