Skip to content

Commit 14bf7fd

Browse files
authored
Merge pull request #921 from softworkz/submit_missing_locks
SocketIOFacade: Add missing locking on .Off calls
2 parents 41a2b07 + f89f2e7 commit 14bf7fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ElectronNET.API/Bridge/SocketIOFacade.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void Once(string eventName, Action action)
8686
{
8787
_socket.On(eventName, _ =>
8888
{
89-
_socket.Off(eventName);
89+
this.Off(eventName);
9090
Task.Run(action);
9191
});
9292
}
@@ -98,7 +98,7 @@ public void Once<T>(string eventName, Action<T> action)
9898
{
9999
_socket.On(eventName, (socketIoResponse) =>
100100
{
101-
_socket.Off(eventName);
101+
this.Off(eventName);
102102
Task.Run(() => action(socketIoResponse.GetValue<T>()));
103103
});
104104
}

0 commit comments

Comments
 (0)