Skip to content

Commit

Permalink
Do not disconnect when a frame cannot be parsed, log it instead
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed May 2, 2024
1 parent 43f1723 commit 549bcd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bellows/ezsp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ def frame_received(self, data: bytes) -> None:
LOGGER.debug("Ignoring empty frame")
return

self._protocol(data)
try:
self._protocol(data)
except Exception:
LOGGER.warning("Failed to parse frame, ignoring")

Check warning on line 333 in bellows/ezsp/__init__.py

View check run for this annotation

Codecov / codecov/patch

bellows/ezsp/__init__.py#L332-L333

Added lines #L332 - L333 were not covered by tests

async def get_board_info(
self,
Expand Down

0 comments on commit 549bcd3

Please sign in to comment.