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

IpcMain.RemoveAllListeners(string) is not removing the listeners #365

Closed
LandinMartensIQ opened this issue Jan 29, 2020 · 3 comments
Closed
Assignees
Labels
Milestone

Comments

@LandinMartensIQ
Copy link

  • Version: 7.30.2
  • Target: .Net Core 3.1

In the C# lib, IpcMain.RemoveAllListeners(string) is not removing the listeners. After executing this function, my event listeners are still firing.

Steps to Reproduce:

  1. Register a listener using IpcMain.On(channel_name)
  2. Wait for the event to be fired at least once from javascript
  3. Now in C# after the event, call `IpcMain.RemoveAllListeners(channel_name)
  4. Fire the event again within javascript
  5. The listener registered at step 1 still fires
@LandinMartensIQ LandinMartensIQ changed the title IpcMain.RemoveAllListeners(string) not working IpcMain.RemoveAllListeners(string) is not removing the listeners Jan 29, 2020
@GregorBiswanger GregorBiswanger self-assigned this Apr 17, 2020
@GregorBiswanger GregorBiswanger added this to the 8.31.1 milestone Apr 17, 2020
@GregorBiswanger
Copy link
Member

I tested it with the current version and there were no problems. Possibly. your code will not be executed with RemoveAllListeners or it is due to the new Electron 8 version. Our latest update in version 8.31.1 will be released in the next few days.

ElectronRemoveAllListeners

@dlamon1
Copy link

dlamon1 commented Dec 23, 2021

Did you find a solution to your problem? I am having the same issue.

@ghost
Copy link

ghost commented Dec 31, 2021

I have the same problem, I have electron and React and when you are using the app for a log time it becomes slow because the number of imports using ipc renderer. I tried to remove al listeners but it continues sending requests.

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

No branches or pull requests

3 participants