forked from Firepup650/python-talk
FIX: Don't crash server links when recieving a K line for an unknown client
This commit is contained in:
parent
16b74ece80
commit
0994f92669
1 changed files with 6 additions and 2 deletions
|
@ -330,7 +330,9 @@ Please note that this is not network level statistics.\n""".encode(
|
||||||
break
|
break
|
||||||
case "K":
|
case "K":
|
||||||
cName = buffer[2:]
|
cName = buffer[2:]
|
||||||
if G.clientsConnected[cName.lower()] == G.remoteID:
|
if not G.clientsConnected.get(cName.lower(), False):
|
||||||
|
pass # They don't exist, safe to ignore
|
||||||
|
elif G.clientsConnected[cName.lower()] == G.remoteID:
|
||||||
G.killList[cName.lower()] = True
|
G.killList[cName.lower()] = True
|
||||||
else:
|
else:
|
||||||
G.servers[G.clientsConnected[cName.lower()]][
|
G.servers[G.clientsConnected[cName.lower()]][
|
||||||
|
@ -510,7 +512,9 @@ async def connectServer(hostname: str, port: int):
|
||||||
break
|
break
|
||||||
case "K":
|
case "K":
|
||||||
cName = buffer[2:]
|
cName = buffer[2:]
|
||||||
if G.clientsConnected[cName.lower()] == G.remoteID:
|
if not G.clientsConnected.get(cName.lower(), False):
|
||||||
|
pass # They don't exist, safe to ignore
|
||||||
|
elif G.clientsConnected[cName.lower()] == G.remoteID:
|
||||||
G.killList[cName.lower()] = True
|
G.killList[cName.lower()] = True
|
||||||
else:
|
else:
|
||||||
G.servers[G.clientsConnected[cName.lower()]][
|
G.servers[G.clientsConnected[cName.lower()]][
|
||||||
|
|
Loading…
Reference in a new issue