fix 500 error when user connects then disconnects immediately

master
Aevann 2024-04-09 16:58:05 +02:00
parent 0509c1648a
commit 594f32e703
1 changed files with 2 additions and 1 deletions

View File

@ -243,7 +243,8 @@ def disconnect(v):
online["messages"].remove(v.id)
return ''
online[room].pop(v.id, None)
if online.get(room):
online[room].pop(v.id, None)
if v.username in typing[room]:
typing[room].remove(v.username)