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

断网状态下,stream读取数据超时会连续报错两次,导致keepalive方法会连续调用两次,其中一个setInterval就永远不会被clear #196

Open
suitongxian opened this issue Aug 7, 2024 · 0 comments

Comments

@suitongxian
Copy link

断网状态下,stream会连续收到两次error事件,内容为“14 UNAVAILABLE: read ETIMEDOUT”,这个错误会触发连续两次handleKeepaliveError方法的调用,而handleKeepaliveError中对keepalive()的调用使用了setTimeout,所以就会连续两次调用keepalive()方法,导致teardown变量的值被最后一次调用覆盖,那么第一次调用中生成的setInterval就永远不会被清除,稳定复现,
复现操作是创建成功租约后,把网线断开观察即可

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