fix: prevent concurrent transcription races and mask API key

This commit is contained in:
Your Name
2026-06-09 19:39:27 -07:00
parent fe21a41532
commit 062f09a000
10 changed files with 159 additions and 46 deletions
+2 -1
View File
@@ -54,12 +54,13 @@ func Init() error {
return nil
}
// Close closes the log file handle.
// Close flushes buffered writes and closes the log file handle.
func Close() {
logMutex.Lock()
defer logMutex.Unlock()
if logFile != nil {
logFile.Sync() // Flush buffered writes so the last log entries are not lost
logFile.Close()
logFile = nil
}