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

超时的设置问题 #230

Closed
ail36413 opened this issue May 5, 2024 · 3 comments
Closed

超时的设置问题 #230

ail36413 opened this issue May 5, 2024 · 3 comments
Labels
寻求帮助 Extra attention is needed

Comments

@ail36413
Copy link

ail36413 commented May 5, 2024

如何修改单个接口的超时时间呢?
Post("url") {
setClient {
readTimeout(3, TimeUnit.MINUTES)
writeTimeout(3, TimeUnit.MINUTES)
}
}.await()
这种改法是不是全局的超时时间都被修改了?

@ail36413 ail36413 added the 寻求帮助 Extra attention is needed label May 5, 2024
@liangjingkanji
Copy link
Owner

你点开函数看下

@ail36413
Copy link
Author

ail36413 commented May 5, 2024

奇怪了,那我默认没有去修改全局的配置,就一个接口改了超时时间。我把服务器断点了。
scopeDialog {} 过了10s,还是不会取消掉

@liangjingkanji
Copy link
Owner

Net只是基于OkHttp封装, 这种问题你去给Okhttp作者提isseus咨询吧

另外超时时间有三个值, 你只修改了2个值

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
寻求帮助 Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants