-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket.RemoteEndPoint exception in OnWsDisconnected #116
Comments
Fixed in 5.0.8 please try! |
No effect on 5.0.8.. From Google Chrome connect by websocket throw chat/index.html - connect by websockets - than disconnect - exception appeared.. |
It's the behavior of .net Socket it will dispose RemoteEndPoint property on Socket.Close() call. OnWsDisconnected() is called after the socket is closed. What do you think of introducing OnWsDisconnecting() callback with valid connected socket in it? |
The flow can be the following:
|
would be nice! |
In our logs we store this information in a following way:
|
New handlers implemented. |
In my websocket chat server I try to use Socket.RemoteEndPoint to show the IP-adress of client, but ,unfortunately, in case "OnWsDisconnected" in attemp to show IP of disconnected client it is an exception like:
System.ObjectDisposedException: "Cannot access a disposed object.
ObjectDisposed_ObjectName_Name".
With showing client ID in this situation has no problems!
Is it any way to show IP of disconnected client without making array of all clients IP?
The text was updated successfully, but these errors were encountered: