Fix huge memory waste in IpcMain.Once

This commit is contained in:
Yuval Rosen
2024-02-15 01:06:08 +02:00
parent 23f4d39a30
commit 1253df3d9a

View File

@@ -117,7 +117,7 @@ namespace ElectronNET.API
public void Once(string channel, Action<object> listener)
{
BridgeConnector.Socket.Emit("registerOnceIpcMainChannel", channel);
BridgeConnector.Socket.On(channel, (args) =>
BridgeConnector.Socket.Once<object>(channel, (args) =>
{
List<object> objectArray = FormatArguments(args);