Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Arksine/moonraker
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 16, 2024
2 parents 2594f07 + 65a8271 commit ee5cc52
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions moonraker/components/spoolman.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,20 @@ async def _connect_websocket(self) -> None:
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
else:
err_list.append(e)
verbose = self.server.is_verbose_enabled()
if verbose:
logging.exception("Failed to connect to Spoolman")
self.server.add_log_rollover_item(
"spoolman_connect", f"Failed to Connect to spoolman: {e}",
not verbose
)
for err in err_list:
if type(err) is type(e) and err.args == e.args:
break
else:
err_list.append(e)
verbose = self.server.is_verbose_enabled()
if verbose:
logging.exception("Failed to connect to Spoolman")
self.server.add_log_rollover_item(
"spoolman_connect", f"Failed to Connect to spoolman: {e}",
not verbose
)
else:
err_list = []
self.ws_connected = True
Expand Down

0 comments on commit ee5cc52

Please sign in to comment.