The timeout was changed from 30s to 15s

This commit is contained in:
2dust
2025-03-20 12:06:13 +08:00
parent 0b9a96209f
commit a60f45ce31
4 changed files with 9 additions and 9 deletions
@@ -420,7 +420,7 @@ object AngConfigManager {
var configText = try {
val httpPort = SettingsManager.getHttpPort()
HttpUtil.getUrlContentWithUserAgent(url, 30000, httpPort)
HttpUtil.getUrlContentWithUserAgent(url, 15000, httpPort)
} catch (e: Exception) {
Log.e(AppConfig.ANG_PACKAGE, "Update subscription: proxy not ready or other error, try……")
//e.printStackTrace()
@@ -135,7 +135,7 @@ object SpeedtestManager {
var result: String
var elapsed = -1L
val conn = HttpUtil.createProxyConnection(SettingsManager.getDelayTestUrl(), port, 30000, 30000) ?: return Pair(elapsed, "")
val conn = HttpUtil.createProxyConnection(SettingsManager.getDelayTestUrl(), port, 15000, 15000) ?: return Pair(elapsed, "")
try {
val start = SystemClock.elapsedRealtime()
val code = conn.responseCode