fix(playout): catch oserror in liquidsoap client
Prevent playout crash when liquidsoap is not yet reachable.
This commit is contained in:
parent
f902537056
commit
6412b17996
4 changed files with 17 additions and 17 deletions
|
@ -58,7 +58,7 @@ class LiquidsoapClient:
|
|||
version = self.version()
|
||||
logger.info("found version %s", version)
|
||||
return version
|
||||
except (ConnectionError, TimeoutError) as exception:
|
||||
except OSError as exception:
|
||||
logger.warning("could not get version: %s", exception)
|
||||
timeout -= 1
|
||||
sleep(1)
|
||||
|
|
|
@ -53,7 +53,7 @@ class LiquidsoapConnection:
|
|||
try:
|
||||
self.connect()
|
||||
return self
|
||||
except (ConnectionError, TimeoutError) as exception:
|
||||
except OSError as exception:
|
||||
self._sock = None
|
||||
self._lock.release()
|
||||
raise exception
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue