diff --git a/src/ElectronNET.API/API/AutoUpdater.cs b/src/ElectronNET.API/API/AutoUpdater.cs index e7cad59..ebe0c9b 100644 --- a/src/ElectronNET.API/API/AutoUpdater.cs +++ b/src/ElectronNET.API/API/AutoUpdater.cs @@ -168,7 +168,7 @@ namespace ElectronNET.API { var tcs = new TaskCompletionSource(); - BridgeConnector.Socket.On("autoUpdater-currentVersion-get-reply", tcs.SetResult); + BridgeConnector.Socket.Once("autoUpdater-currentVersion-get-reply", tcs.SetResult); BridgeConnector.Socket.Emit("autoUpdater-currentVersion-get"); return tcs.Task; @@ -201,7 +201,7 @@ namespace ElectronNET.API { var tcs = new TaskCompletionSource(); - BridgeConnector.Socket.On("autoUpdater-channel-get-reply", tcs.SetResult); + BridgeConnector.Socket.Once("autoUpdater-channel-get-reply", tcs.SetResult); BridgeConnector.Socket.Emit("autoUpdater-channel-get"); return tcs.Task; @@ -221,7 +221,7 @@ namespace ElectronNET.API { var tcs = new TaskCompletionSource>(); - BridgeConnector.Socket.On>("autoUpdater-requestHeaders-get-reply", tcs.SetResult); + BridgeConnector.Socket.Once>("autoUpdater-requestHeaders-get-reply", tcs.SetResult); BridgeConnector.Socket.Emit("autoUpdater-requestHeaders-get"); return tcs.Task; @@ -441,7 +441,7 @@ namespace ElectronNET.API var tcs = new TaskCompletionSource(); string guid = Guid.NewGuid().ToString(); - BridgeConnector.Socket.On("autoUpdaterGetFeedURLComplete" + guid, tcs.SetResult); + BridgeConnector.Socket.Once("autoUpdaterGetFeedURLComplete" + guid, tcs.SetResult); BridgeConnector.Socket.Emit("autoUpdaterGetFeedURL", guid); return tcs.Task; diff --git a/src/ElectronNET.API/API/Notification.cs b/src/ElectronNET.API/API/Notification.cs index d1ae2b8..1ed5ddd 100644 --- a/src/ElectronNET.API/API/Notification.cs +++ b/src/ElectronNET.API/API/Notification.cs @@ -62,7 +62,7 @@ namespace ElectronNET.API isActionDefined = true; BridgeConnector.Socket.Off("NotificationEventShow"); - BridgeConnector.Socket.Once("NotificationEventShow", (id) => { _notificationOptions.Single(x => x.ShowID == id).OnShow(); }); + BridgeConnector.Socket.On("NotificationEventShow", (id) => { _notificationOptions.Single(x => x.ShowID == id).OnShow(); }); } if (notificationOptions.OnClick != null)