IpcMain.Once(string) is not one time use, is not removing listener #449

Closed
opened 2026-01-29 16:39:54 +00:00 by claunia · 1 comment
Owner

Originally created by @LandinMartensIQ on GitHub (Jan 29, 2020).

Originally assigned to: @GregorBiswanger on GitHub.

  • Version: 7.30.2
  • Target: .Net Core 3.1

In the C# lib, IpcMain.Once(string) is not removing the listener after.

Steps to Reproduce:

  1. Register a listener using IpcMain.Once(channel_name)
  2. Wait for the event to be fired at least once from javascript
  3. Now fire the event again within javascript
  4. The listener registered at step 1 still fires even though it should have been removed.

I think this is directly related to my other issue I just posted: https://github.com/ElectronNET/Electron.NET/issues/365

Originally created by @LandinMartensIQ on GitHub (Jan 29, 2020). Originally assigned to: @GregorBiswanger on GitHub. * **Version**: 7.30.2 * **Target**: .Net Core 3.1 In the C# lib, `IpcMain.Once(string)` is not removing the listener after. Steps to Reproduce: 1. Register a listener using `IpcMain.Once(channel_name)` 2. Wait for the event to be fired at least once from javascript 3. Now fire the event again within javascript 4. The listener registered at step 1 still fires even though it should have been removed. I think this is directly related to my other issue I just posted: https://github.com/ElectronNET/Electron.NET/issues/365
claunia added the bug label 2026-01-29 16:39:54 +00:00
Author
Owner

@GregorBiswanger commented on GitHub (Apr 20, 2020):

I tested it with the current version and there were no problems. Possibly. do you unconsciously register it more often, or is it due to the new Electron 8 version. Our latest update in version 8.31.1 will be released in the next few days.

ElectronIpcMainOnceSample

@GregorBiswanger commented on GitHub (Apr 20, 2020): I tested it with the current version and there were no problems. Possibly. do you unconsciously register it more often, or is it due to the new Electron 8 version. Our latest update in version 8.31.1 will be released in the next few days. ![ElectronIpcMainOnceSample](https://user-images.githubusercontent.com/7336300/79752095-05e99480-8314-11ea-813c-43790baa315e.gif)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#449