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

主进程使用了setInterval,热重载会开启多个窗口 #403

Open
4 tasks done
weiminghaoo opened this issue Feb 6, 2024 · 2 comments
Open
4 tasks done

主进程使用了setInterval,热重载会开启多个窗口 #403

weiminghaoo opened this issue Feb 6, 2024 · 2 comments

Comments

@weiminghaoo
Copy link

Describe the bug

主进程使用了setInterval,热重载watchHook中ps.kill()杀不死,是否可以修改为ps.kill('SIGKILL')?

Electron-Vite Version

2.0.0

Electron Version

28.2.0

Vite Version

5.0.12

Validations

@alex8088
Copy link
Owner

@weiminghaoo 未能重现此问题,setInterval 是否有特殊逻辑,提供相关复现示例或更详尽的信息。

@weiminghaoo
Copy link
Author

@weiminghaoo 未能重现此问题,setInterval 是否有特殊逻辑,提供相关复现示例或更详尽的信息。

import { usb } from 'usb'
usb.on('attach', (device) => {
})
usb.on('detach', (device) => {
})
使用了usb,内部应该是有使用setInterval来监听usb设备的插拔,我的开发环境是mac

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

2 participants