fix: don't init aria2 in new goroutine (close #1752)

pull/1831/head
Noah Hsu 2022-09-26 15:11:08 +08:00
parent f86ad1dce4
commit 2fc0ccbfe0
1 changed files with 5 additions and 7 deletions

View File

@ -6,11 +6,9 @@ import (
)
func InitAria2() {
go func() {
_, err := aria2.InitClient(2)
if err != nil {
//utils.Log.Errorf("failed to init aria2 client: %+v", err)
utils.Log.Infof("Aria2 not ready.")
}
}()
_, err := aria2.InitClient(2)
if err != nil {
//utils.Log.Errorf("failed to init aria2 client: %+v", err)
utils.Log.Infof("Aria2 not ready.")
}
}