Commit 80d67793 authored by sheteng's avatar sheteng

fix bugs

parent f303bd97
......@@ -98,13 +98,15 @@ object AcceleratorUtils {
pre_net = net.delay
if (state == BaseService.State.Connected) {
val delay = NetUtils.tcpPing(split[0], split[1].toInt(),DataStore.portProxy).toInt()
acc_net = if (delay > pre_net) pre_net else delay
acc_net = (delay * 0.5).toInt()
LoginUtils.getUserHasTimer {
if (!it) { //没有加速时长关闭服务
stopAccelerator()
}
}
net.delay = if (net.delay < delay) net.delay else delay
} else {
acc_net = -1
}
net.lossRate = if (net.delay == -1) "100" else "0"
net.preNetDelay = pre_net
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment