Fix exceptrion - changed while being iterated

This commit is contained in:
Simon 2021-04-13 11:25:35 +01:00
parent 3912e529f9
commit 3267e2bb21

View File

@ -420,9 +420,12 @@ def stream_trimmer_loop():
removed = systems[system].STATUS.pop(stream_id) removed = systems[system].STATUS.pop(stream_id)
try: try:
_bcsq_remove = []
for tgid in _sysconfig['_bcsq']: for tgid in _sysconfig['_bcsq']:
if _sysconfig['_bcsq'][tgid] == stream_id: if _sysconfig['_bcsq'][tgid] == stream_id:
removed = _sysconfig['_bcsq'].pop(tgid) _bcsq.append(tgid)
for bcrm in _bcsq_remove:
removed = _sysconfig['_bcsq'].pop(bcrm)
except KeyError: except KeyError:
pass pass
else: else: