Skip to content
New issue

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

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

Already on GitHub? # to your account

如何处理超时异常 #235

Open
JontyMin opened this issue Aug 11, 2023 · 2 comments
Open

如何处理超时异常 #235

JontyMin opened this issue Aug 11, 2023 · 2 comments

Comments

@JontyMin
Copy link

你好,需要咨询以下问题:我在请求另一个系统处理时长超过100s,我没办法捕获到异常?应该如何处理超时无响应的问题。期待你的回复!

@xljiulang
Copy link
Collaborator

xljiulang commented Aug 11, 2023

假设请求配置的超时时长是100s,如果已经等待了100s,既没有响应,也没有异常。那么很可能是你的程序不正确的使用了异步阻塞调用导致程序死锁。

@JontyMin
Copy link
Author

或者是否由于catch的异常类型有误:WebException 而应该是HttpRequestException

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

No branches or pull requests

2 participants