Shield Reolink webhook callback from cancelation (#89798)
* shield Reolink webhook callback from cancelation * Update homeassistant/components/reolink/host.py Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io> * fix styling * fix black * Revert to using asyncio.shield --------- Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>pull/89973/head
parent
c94b054d75
commit
939fce4607
|
@ -327,6 +327,12 @@ class ReolinkHost:
|
|||
|
||||
async def handle_webhook(
|
||||
self, hass: HomeAssistant, webhook_id: str, request: Request
|
||||
):
|
||||
"""Shield the incoming webhook callback from cancellation."""
|
||||
await asyncio.shield(self.handle_webhook_shielded(hass, webhook_id, request))
|
||||
|
||||
async def handle_webhook_shielded(
|
||||
self, hass: HomeAssistant, webhook_id: str, request: Request
|
||||
):
|
||||
"""Handle incoming webhook from Reolink for inbound messages and calls."""
|
||||
|
||||
|
|
Loading…
Reference in New Issue