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

关于Timeout超时问题 #43

Open
ftq617 opened this issue Sep 18, 2023 · 6 comments
Open

关于Timeout超时问题 #43

ftq617 opened this issue Sep 18, 2023 · 6 comments

Comments

@ftq617
Copy link

ftq617 commented Sep 18, 2023

我在请求的时候设置了 Timeout 参数,但是实际使用的时候, 会出现 一个小时之后才返回的情况(我的使用场景中请求并发很高), 看了你的说明写的是 只对连接时响应有效。 请问下 有没有一种方案 可以在超时后直接停止这个请求,直接返回呢?

@wangluozhe
Copy link
Owner

可以自行写一个context上下文,不需要借助我这个Timeout

@ftq617
Copy link
Author

ftq617 commented Sep 27, 2023

可以自行写一个context上下文,不需要借助我这个Timeout

我尝试自行创建 context 并往下传,但是依旧也会出现超过指定预期时间, 普遍结束在两倍的超时时间,偶尔也会出现好几倍的超时时间。

@jianmaikj
Copy link

我也有这个问题

@a549671887
Copy link

你好 请问后面有啥好的解决办法吗,或者自行创建context上下文 可否分享下代码 感谢

@ftq617
Copy link
Author

ftq617 commented Jun 20, 2024

你好 请问后面有啥好的解决办法吗,或者自行创建context上下文 可否分享下代码 感谢

没有,弃坑吧,换个项目就行了

@a549671887
Copy link

你好 请问后面有啥好的解决办法吗,或者自行创建context上下文 可否分享下代码 感谢

没有,弃坑吧,换个项目就行了
主要我的请求是要换tls又要支持http2 正好他这个支持

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

4 participants