mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-19 06:43:42 +00:00
fix(windows): release FFmpeg memory and capture native crashes
This commit is contained in:
1 parent
89dfbe4c45
commit
89bd3f3af0
17 files changed
+486
-17
No files matched your search
@@ -2659,11 +2659,12 @@ func logPanic(logDir string) {
|
||||
if err := util.CreateDirIfNotExist(logDir); err != nil {
|
||||
return
|
||||
}
|
||||
f, err := os.Create(filepath.Join(logDir, "crash.log"))
|
||||
f, err := os.OpenFile(filepath.Join(logDir, "crash.log"), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0600)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
debug.SetCrashOutput(f, debug.CrashOptions{})
|
||||
defer f.Close() // SetCrashOutput duplicates the descriptor.
|
||||
_ = debug.SetCrashOutput(f, debug.CrashOptions{})
|
||||
}
|
||||
|
||||
func (d *Downloader) assignFetcherManager(task *Task) error {
|
||||
|
||||
Reference in new issue
Block a user