Skip to content

Commit

Permalink
fix(hardware): stop ot3 controller tests hanging (#12994)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsinapi authored Jun 27, 2023
1 parent 8459197 commit 397842a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hardware/opentrons_hardware/drivers/can_bus/can_messenger.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ async def _read_task_shield(self) -> None:
while True:
try:
await self._read_task()
except asyncio.CancelledError:
except (asyncio.CancelledError, StopAsyncIteration):
return
except (CANCommunicationError, AsyncHardwareError, CanError) as e:
log.exception(f"Nonfatal error in CAN read task: {e}")
Expand Down Expand Up @@ -389,6 +389,7 @@ async def _read_task(self) -> None:
log.exception(f"Failed to build from {message}")
else:
log.error(f"Message {message} is not recognized.")
raise StopAsyncIteration

async def _handle_error(self, build: BinarySerializable) -> None:
err_msg = ErrorMessage(payload=build) # type: ignore[arg-type]
Expand Down

0 comments on commit 397842a

Please sign in to comment.