mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-21 18:55:17 +00:00
69cef89953
Currently when a client connects that is already there,
the old socket is closed, and the code tries to reuse the existing client object by exchanging its socket.
Reusing the same client object and just changing its socket does cause issues though with copies of the client in other threads.
In the situations that I could reproduce, it always disconnected both sockets, the old one and then the new one.
Instead I make a copy of the client object, use the new socket, remove the old object and add the new object to the collection.
(cherry picked from commit
|
||
---|---|---|
.. | ||
Client.cs | ||
CommandHandler.cs | ||
DiscordBot.cs | ||
FlipOptions.cs | ||
Program.cs | ||
Server.cs | ||
Server.csproj | ||
Settings.cs | ||
Time.cs |