Fix flaky stream tests due to race in idle timeout callback (#46687)

This commit is contained in:
Allen Porter 2021-02-17 01:05:50 -08:00 committed by GitHub
parent 971e27dd80
commit efb172cedd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,6 +141,7 @@ class Stream:
"""Reset access token and cleanup stream due to inactivity."""
self.access_token = None
if not self.keepalive:
if self._hls:
self._hls.cleanup()
self._hls = None
self._hls_timer = None