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

轮询时间不准当在浏览器屏幕不可见时 #203

Open
enjoy-wind opened this issue Jun 6, 2023 · 0 comments
Open

轮询时间不准当在浏览器屏幕不可见时 #203

enjoy-wind opened this issue Jun 6, 2023 · 0 comments

Comments

@enjoy-wind
Copy link

Bug 描述 Bug description

由于浏览器优化原因,当屏幕不可见时,setTimeout会延迟触发,而源码中setTimeout在轮训时使用,所以推荐使用work-times代码提setTimeout.
场景:
有一些驾驶舱页面,登陆时长比较短,通过配置轮询完成token重置,保证登陆持续性

代码重现 Reproduce

期望结果 Desired result

轮询时间准确

其他信息 Other information

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

No branches or pull requests

2 participants