refactor(voice): close recorder stream under suppress(Exception)

Matches the stop() line above; still closes when stop() raises.
This commit is contained in:
kshitijk4poor
2026-09-24 20:10:24 +05:30
committed by kshitij
parent 3fb6850203
commit 72942bfcae

View File

@@ -815,10 +815,8 @@ class AudioRecorder(_RecorderBase):
def _do_close():
with suppress(Exception):
stream.stop()
try:
with suppress(Exception):
stream.close()
except Exception:
pass
t = threading.Thread(target=_do_close, daemon=True)
t.start()