1
mirror of git://git.acid.vegas/IRCP.git synced 2024-11-23 00:16:41 +00:00

Added a note about while loops..

This commit is contained in:
Dionysus 2023-05-26 03:50:23 -04:00
parent 3a1963b032
commit ab7062537a
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE

View File

@ -233,7 +233,7 @@ class probe:
pass pass
async def listen(self): async def listen(self):
while not self.reader.at_eof(): while not self.reader.at_eof(): # NOTE: should we use while True and break @ exceptions?
try: try:
data = await asyncio.wait_for(self.reader.readuntil(b'\r\n'), throttle.ztimeout) data = await asyncio.wait_for(self.reader.readuntil(b'\r\n'), throttle.ztimeout)
line = data.decode('utf-8').strip() line = data.decode('utf-8').strip()