mirror of
https://github.com/jahruz67/wisp-open.git
synced 2026-08-08 18:14:08 +00:00
fix: prevent concurrent transcription races and mask API key
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user