Feat: add local policy

This commit is contained in:
HFO4
2020-02-26 15:11:06 +08:00
parent c1d2b933aa
commit f1ef21e195
13 changed files with 270 additions and 35 deletions

View File

@@ -93,8 +93,10 @@ func Init(isReload bool) {
// 关闭上个初始连接
if previousClient, ok := Instance.(*RPCService); ok {
util.Log().Debug("关闭上个 aria2 连接")
previousClient.caller.Close()
if previousClient.Caller != nil {
util.Log().Debug("关闭上个 aria2 连接")
previousClient.Caller.Close()
}
}
options := model.GetSettingByNames("aria2_rpcurl", "aria2_token", "aria2_options")