Open jpschw opened 9 years ago
Yep, I confirm it. Now I'm trying to fix it. Do you have any ideas?
Because of TcpListener we need to close all connections with users, so, how to do this? Without sending command to client to break connection.
I fix it.
as here saying:
You are responsible for closing your accepted connections separately.
so, open
Classes\UserContext.cs
and add this code to UserContext class:
public void Disconnect()
{
Context.Connection.GetStream().Close();
Context.Connection.Close();
}
~UserContext()
{
Disconnect();
}
And if you collect your clients with their UserContexts then you can close all connections for each user. It should help you to stop the WebSocket server
When I invoke the Stop() method on an instance of WebSocketServer, the connection stays open.