This commit is contained in:
Administrator 2025-07-09 18:53:24 +08:00
parent 5772b91b9a
commit 5bcecde83d
3 changed files with 5 additions and 8 deletions

View File

@ -16,17 +16,14 @@ import java.util.concurrent.TimeUnit
object MyGet {
private const val TAG = "MyGet"
val affHttpClient: OkHttpClient = OkHttpClient()
fun getAffHttpClient(): OkHttpClient {
affHttpClient.dispatcher.maxRequests = 1000
affHttpClient.dispatcher.maxRequestsPerHost = 1000
return affHttpClient
val affHttpClient: OkHttpClient = OkHttpClient().apply {
dispatcher.maxRequests = 1000
dispatcher.maxRequestsPerHost = 1000
}
fun get(url_: String): String {
var response: Response? = null
val client: OkHttpClient = getAffHttpClient().newBuilder()
val client: OkHttpClient = affHttpClient.newBuilder()
.connectTimeout(5, TimeUnit.SECONDS)
.readTimeout(5, TimeUnit.SECONDS)
.build()

View File

@ -159,6 +159,7 @@ object ChangeDeviceInfoUtil {
}
} catch (e: JSONException) {
e.printStackTrace()
callBack.changeFailed()
}
}

View File

@ -785,7 +785,6 @@ object Util {
nRandom++
if (nRandom % 3 == 0) {
// execInstallTask(context);
execReloginTask(context)
} else {
execInstallTask(context)