Commit 403f72fe authored by sheteng's avatar sheteng

fix bugs

parent b682cb3a
...@@ -22,6 +22,7 @@ import com.github.shadowsocks.bg.BaseService ...@@ -22,6 +22,7 @@ import com.github.shadowsocks.bg.BaseService
import com.github.shadowsocks.database.Profile import com.github.shadowsocks.database.Profile
import com.github.shadowsocks.database.ProfileManager import com.github.shadowsocks.database.ProfileManager
import com.github.shadowsocks.http.LineConfig import com.github.shadowsocks.http.LineConfig
import com.github.shadowsocks.net.NetworkManager
import com.github.shadowsocks.preference.DataStore import com.github.shadowsocks.preference.DataStore
import com.hjq.toast.ToastUtils import com.hjq.toast.ToastUtils
import com.tencent.mmkv.MMKV import com.tencent.mmkv.MMKV
...@@ -86,11 +87,10 @@ object AcceleratorUtils { ...@@ -86,11 +87,10 @@ object AcceleratorUtils {
context.lifecycleScope.launch(Dispatchers.IO) { context.lifecycleScope.launch(Dispatchers.IO) {
while (true) { while (true) {
game?.let { game?.let {
val split = it.boosterServer.split(":")
var net = NetState(-1, -1, "100") var net = NetState(-1, -1, "100")
net.preNetDelay = NetUtils.tcpPing(split[0], split[1].toInt()).toInt()
if (state == BaseService.State.Connected) { if (state == BaseService.State.Connected) {
val split = it.boosterServer.split(":")
net.preNetDelay = NetUtils.tcpPing(split[0], split[1].toInt()).toInt()
val delay = val delay =
NetUtils.tcpPing(split[0], split[1].toInt(), DataStore.portProxy) NetUtils.tcpPing(split[0], split[1].toInt(), DataStore.portProxy)
.toInt() .toInt()
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="40.5dp"> android:layout_marginTop="47.5dp">
<TextView <TextView
android:id="@+id/acc_state_tx" android:id="@+id/acc_state_tx"
......
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