mirror of
https://github.com/qinyuhang/ShadowsocksX-NG-R.git
synced 2026-10-20 22:44:11 +00:00
fix wrong notification on bad netstat
This commit is contained in:
@@ -100,9 +100,8 @@ class Subscribe: NSObject{
|
||||
callback(response.result.value!)
|
||||
}
|
||||
else{
|
||||
callback("")//give a empty callback
|
||||
callback("")
|
||||
self.pushNotification(title: "请求失败", subtitle: "", info: "发送到\(url)的请求失败,请检查您的网络")
|
||||
// alse push a notification indicate that the profile may not available
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,6 +124,7 @@ class Subscribe: NSObject{
|
||||
return getMaxFromRes(resString: cache)
|
||||
}
|
||||
sendRequest(url: self.subscribeFeed, options: "", callback: { resString in
|
||||
if resString == "" {return}
|
||||
getMaxFromRes(resString: resString)
|
||||
self.cache = resString
|
||||
})
|
||||
@@ -164,6 +164,7 @@ class Subscribe: NSObject{
|
||||
// return updateServerHandler(resString: cache)
|
||||
// }
|
||||
sendRequest(url: self.subscribeFeed, options: "", callback: { resString in
|
||||
if resString == "" {return}
|
||||
updateServerHandler(resString: resString)
|
||||
self.cache = resString
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user