spoolman: fix exception handling

Make sure the connection delay isn't skipped if the
error list is full.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2024-02-14 20:34:33 -05:00
parent 67c98f6a76
commit 65a8271925
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 13 additions and 14 deletions

View File

@ -129,9 +129,8 @@ class SpoolManager:
except asyncio.CancelledError:
raise
except Exception as e:
if len(err_list) > 10:
if len(err_list) < 10:
# Allow up to 10 unique errors.
continue
for err in err_list:
if type(err) is type(e) and err.args == e.args:
break