Wrong error to catch

This commit is contained in:
Firepup Sixfifty 2024-07-16 21:27:35 +00:00
parent 907a46fe4e
commit 0756cd208b
Signed by: Firepup650
SSH key fingerprint: SHA256:U0Zp8EhEe3CMqFSrC79CqatzaEiL4sjta80/RSX2XrY

View file

@ -118,7 +118,7 @@ async def handleClient(reader, writer):
await asyncio.wait_for(
reader.read(), 0.01
) # Silently consume the excess username data
except asyncio.TimeoutError:
except TimeoutError:
pass
if not name:
writer.write(b"Nice try. Actually set a nick.\n")
@ -193,7 +193,7 @@ Please note that this is not network level statistics.\n""".encode(
G.S2SLogs.append(("M", (name, request), G.remoteID))
if response:
G.msgs.append(response)
except asyncio.TimeoutError:
except TimeoutError:
pass
if msgIndex < len(G.msgs):
writer.writelines(G.msgs[msgIndex:])