Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

局部配置超时时间配置代码调用api有误 #45

Open
taotao9455 opened this issue Mar 19, 2021 · 0 comments
Open

局部配置超时时间配置代码调用api有误 #45

taotao9455 opened this issue Mar 19, 2021 · 0 comments

Comments

@taotao9455
Copy link

package com.vise.xsnow.http.request;
该类中,generateLocalConfig()方法中,配置超时时间api有误,全部设置的都是连接服务器后的读取时间,在局部配置修改超时时间不生效:
if (readTimeOut > 0) {
newBuilder.readTimeout(readTimeOut, TimeUnit.SECONDS);
}

    if (writeTimeOut > 0) {

//应调用newBuilder.writeTimeout(writeTimeOut, TimeUnit.SECONDS);
newBuilder.readTimeout(writeTimeOut, TimeUnit.SECONDS);
}

    if (connectTimeOut > 0) {

//应调用 newBuilder.connectTimeout(connectTimeOut, TimeUnit.SECONDS);
newBuilder.readTimeout(connectTimeOut, TimeUnit.SECONDS);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant