我需要okhttp3中的超时帮助。我将最大连接,读取和写入超时配置为4分钟,如下所示:
OkHttpClient client = new OkHttpClient.Builder()
.connectTimeout(totalSeconds, TimeUnit.SECONDS)
.writeTimeout(totalSeconds, TimeUnit.SECONDS)
.readTimeout(totalSeconds, TimeUnit.SECONDS)
.build();
totalSeconds = 240.000
但在2分钟内抛出异常SocketTimeoutException。请有人在这种情况下?我怎么解决呢?提前致谢