fix(tts): explicitly ignore file.Close() error in write error path

This commit is contained in:
程智超0668000959 2026-06-15 20:30:09 +08:00
parent cf67dd3851
commit 2f8c462366

View file

@ -146,7 +146,7 @@ func SynthesizeAndStore(
_, err = io.Copy(file, stream) _, err = io.Copy(file, stream)
if err != nil { if err != nil {
file.Close() _ = file.Close()
return "", fmt.Errorf("failed to write tts audio: %w", err) return "", fmt.Errorf("failed to write tts audio: %w", err)
} }