Files
linux-voice-assistant/linux_voice_assistant
imonlinux 1da9ac1fac Update audio_engine.py
Summary

Add thread-safe locking for wake word reload logic

Problem

Wake word reload logic accessed self.state.wake_words_changed flag without synchronization, creating a potential race condition when wake words are dynamically switched via Home Assistant.

Changes

Added self._wake_words_lock = threading.Lock() in __init__
Wrapped wake word reload block with with self._wake_words_lock: context manager
Ensures atomic read-modify-write of wake_words_changed flag
Impact

Risk: Very low - purely defensive improvement
Benefit: Eliminates race condition in wake word switching
Performance: Negligible overhead (lock only held during reload check)
2026-01-10 13:23:33 -08:00
..
2025-08-26 09:30:58 -05:00
2026-01-06 13:37:00 -08:00
2025-11-18 15:15:46 -08:00
2026-01-10 13:23:33 -08:00
2026-01-06 13:35:52 -08:00
2025-11-17 17:42:40 -08:00
2026-01-06 13:46:32 -08:00
2026-01-06 13:36:28 -08:00
2025-12-11 18:47:01 -08:00
2025-11-17 21:50:53 -08:00
2026-01-01 15:16:13 -08:00
2025-11-29 14:38:13 -08:00
2026-01-05 21:52:41 -08:00
2026-01-01 15:17:41 -08:00
2025-11-29 23:43:08 -08:00
2025-11-21 17:17:56 -08:00
2025-11-19 18:46:05 -08:00