SocketclusterClientDotNet icon indicating copy to clipboard operation
SocketclusterClientDotNet copied to clipboard

If Listener is not set, Null Ref occurs

Open phillijw opened this issue 2 years ago • 0 comments

https://github.com/sacOO7/SocketclusterClientDotNet/blob/4013bada049d4c17506343fac0c61bf32f3bb583/ScClient/Socket.cs#L117C34-L117C41

I see two ways around this:

  1. Set a default Listener in the constructor that just doesn't do anything
  2. Check if the listener is null and throw a better exception than a null ref (or don't call the listener which would get annoying to do in every spot)

phillijw avatar Oct 27 '23 22:10 phillijw