doghappy / socket.io-client-csharp

socket.io-client implemention for .NET
MIT License
715 stars 124 forks source link

Inconsistency between registering and unregistering event handlers #364

Closed sirdx closed 3 months ago

sirdx commented 3 months ago

Expected Behavior

When registering a new event handler with the On(string eventName, Func<SocketIOResponse, Task> callback) method it should also be unregistered when the Off(string eventName) method is called.

Actual Behavior

The event does not get unregistered (_eventFuncHandlers are ignored in the Off method).

Steps to Reproduce the Problem

  1. Register an event handler with the On(string eventName, Func<SocketIOResponse, Task> callback) method.
  2. Unregister it with the Off(string eventName) method.

Specifications