This commit is contained in:
parent
5772b91b9a
commit
5bcecde83d
|
@ -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()
|
||||
|
|
|
@ -159,6 +159,7 @@ object ChangeDeviceInfoUtil {
|
|||
}
|
||||
} catch (e: JSONException) {
|
||||
e.printStackTrace()
|
||||
callBack.changeFailed()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -785,7 +785,6 @@ object Util {
|
|||
nRandom++
|
||||
|
||||
if (nRandom % 3 == 0) {
|
||||
// execInstallTask(context);
|
||||
execReloginTask(context)
|
||||
} else {
|
||||
execInstallTask(context)
|
||||
|
|
Loading…
Reference in New Issue