Adjust error handling scope in samsungtv (#66692)
Co-authored-by: epenet <epenet@users.noreply.github.com>pull/67466/head^2
parent
b8861578ff
commit
26f2388fa1
|
@ -430,10 +430,7 @@ class SamsungTVWSBridge(SamsungTVBridge):
|
||||||
"""Create or return a remote control instance."""
|
"""Create or return a remote control instance."""
|
||||||
if self._remote is None or not self._remote.is_alive():
|
if self._remote is None or not self._remote.is_alive():
|
||||||
# We need to create a new instance to reconnect.
|
# We need to create a new instance to reconnect.
|
||||||
try:
|
LOGGER.debug("Create SamsungTVWSBridge for %s (%s)", CONF_NAME, self.host)
|
||||||
LOGGER.debug(
|
|
||||||
"Create SamsungTVWSBridge for %s (%s)", CONF_NAME, self.host
|
|
||||||
)
|
|
||||||
assert self.port
|
assert self.port
|
||||||
self._remote = SamsungTVWSAsyncRemote(
|
self._remote = SamsungTVWSAsyncRemote(
|
||||||
host=self.host,
|
host=self.host,
|
||||||
|
@ -442,6 +439,7 @@ class SamsungTVWSBridge(SamsungTVBridge):
|
||||||
timeout=TIMEOUT_WEBSOCKET,
|
timeout=TIMEOUT_WEBSOCKET,
|
||||||
name=VALUE_CONF_NAME,
|
name=VALUE_CONF_NAME,
|
||||||
)
|
)
|
||||||
|
try:
|
||||||
await self._remote.start_listening()
|
await self._remote.start_listening()
|
||||||
# This is only happening when the auth was switched to DENY
|
# This is only happening when the auth was switched to DENY
|
||||||
# A removed auth will lead to socket timeout because waiting for auth popup is just an open socket
|
# A removed auth will lead to socket timeout because waiting for auth popup is just an open socket
|
||||||
|
|
Loading…
Reference in New Issue