Accidental check inversion

This commit is contained in:
Firepup Sixfifty 2024-07-15 20:43:57 +00:00
parent e47c3ff9d0
commit 7f6a4e7b3c
Signed by: Firepup650
SSH key fingerprint: SHA256:U0Zp8EhEe3CMqFSrC79CqatzaEiL4sjta80/RSX2XrY

View file

@ -196,7 +196,7 @@ async def handleClient(reader, writer):
else: # This is... probably a server? else: # This is... probably a server?
sName = name[4:] # Trim off the S2S label sName = name[4:] # Trim off the S2S label
if ( if (
G.servers.get(sName, False) == False G.servers.get(sName, False) != False
): # Have to explicitly check, empty list is False, but does not == False ): # Have to explicitly check, empty list is False, but does not == False
writer.close() writer.close()
await writer.wait_closed() await writer.wait_closed()
@ -369,7 +369,7 @@ async def connectServer(hostname: str, port: int):
await asyncio.wait_for(reader.read(1024), 0.1) await asyncio.wait_for(reader.read(1024), 0.1)
except TimoutError: except TimoutError:
pass pass
if G.servers.get(rID, False) == False: if G.servers.get(rID, False) != False:
writer.close() writer.close()
await writer.wait_closed() await writer.wait_closed()
return return