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

fix: check web content is crashed or not before call ipc send #448

Merged

Conversation

DamonYu6
Copy link
Contributor

Issue
When the electron renderer process is killed, the IPC communication fails and numerous error messages appear in the console.

Way to reproduce
Find the renderer process in the task manager/activity monitor, and kill it manually

Solution
Before using IPC channels, call the webContents.isCrashed() API to verify its availability.

image

@megahertz
Copy link
Owner

megahertz commented Dec 16, 2024

Thank you. Despite this being a sporadic case, it makes sense to handle this situation. Hopefully, isCrashed call is pretty fast. I'll publish it a bit later.

@megahertz megahertz merged commit 5fbc131 into megahertz:master Dec 16, 2024
0 of 7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants