Skip to content

Commit 2e78445

Browse files
committed
Guard and log warning for receiver worker
1 parent e9a6413 commit 2e78445

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

plugwise_usb/connection/receiver.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,15 @@ async def _receive_queue_worker(self):
231231
_LOGGER.debug("Process from receive queue: %s", response)
232232
if isinstance(response, StickResponse):
233233
_LOGGER.debug("Received %s", response)
234-
await self._notify_stick_response_subscribers(response)
234+
try:
235+
await self._notify_stick_response_subscribers(response)
236+
except Exception as exc:
237+
_LOGGER.warning("Failed to process %s : %s", response, exc)
235238
else:
236-
await self._notify_node_response_subscribers(response)
239+
try:
240+
await self._notify_node_response_subscribers(response)
241+
except Exception as exc:
242+
_LOGGER.warning("Failed to process %s : %s", response, exc)
237243
self._receive_queue.task_done()
238244
_LOGGER.debug("Receive_queue_worker stopped")
239245

0 commit comments

Comments
 (0)