Fix exceptrion - changed while being iterated

This commit is contained in:
Simon 2021-04-13 11:25:35 +01:00
parent 3912e529f9
commit 3267e2bb21
1 changed files with 4 additions and 1 deletions

View File

@ -420,9 +420,12 @@ def stream_trimmer_loop():
removed = systems[system].STATUS.pop(stream_id)
try:
_bcsq_remove = []
for tgid in _sysconfig['_bcsq']:
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:
pass
else: