Fixed connection close on null reply
This commit is contained in:
parent
9111c63691
commit
f419e9faf0
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -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} ", "")
|
||||
|
|
Reference in a new issue