Fix resetting access token on streams with keepalive (#22148)
This commit is contained in:
1 parent
e14b243336
commit
ce5cf5803c
2 files changed
+19
-3
No files matched your search
@@ -120,10 +120,16 @@ class Stream:
|
||||
"""Remove provider output stream."""
|
||||
if provider.format in self._outputs:
|
||||
del self._outputs[provider.format]
|
||||
self.check_idle()
|
||||
|
||||
if not self._outputs:
|
||||
self.stop()
|
||||
|
||||
def check_idle(self):
|
||||
"""Reset access token if all providers are idle."""
|
||||
if all([p.idle for p in self._outputs.values()]):
|
||||
self.access_token = None
|
||||
|
||||
def start(self):
|
||||
"""Start a stream."""
|
||||
if self._thread is None or not self._thread.isAlive():
|
||||
|
||||
Reference in new issue
Block a user