mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-23 05:07:47 +00:00
Receive routine in the lobby server now checks if bytes read is > (not >=) than 0. This was causing connections to stay active and cause the CPU to get bogged down.
This commit is contained in:
parent
49a13effca
commit
60b4035ec5
2 changed files with 6 additions and 4 deletions
|
@ -76,6 +76,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
|
||||
public void disconnect()
|
||||
{
|
||||
socket.Shutdown(SocketShutdown.Both);
|
||||
socket.Disconnect(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,9 +51,9 @@ namespace FFXIVClassic_Lobby_Server
|
|||
#region Socket Handling
|
||||
public bool startServer()
|
||||
{
|
||||
cleanupThread = new Thread(new ThreadStart(socketCleanup));
|
||||
cleanupThread.Name = "LobbyThread:Cleanup";
|
||||
cleanupThread.Start();
|
||||
//cleanupThread = new Thread(new ThreadStart(socketCleanup));
|
||||
//cleanupThread.Name = "LobbyThread:Cleanup";
|
||||
//cleanupThread.Start();
|
||||
|
||||
IPEndPoint serverEndPoint = new System.Net.IPEndPoint(IPAddress.Parse(ConfigConstants.OPTIONS_BINDIP), FFXIV_LOBBY_PORT);
|
||||
|
||||
|
@ -147,7 +147,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
|
||||
bytesRead += conn.lastPartialSize;
|
||||
|
||||
if (bytesRead >= 0)
|
||||
if (bytesRead > 0)
|
||||
{
|
||||
int offset = 0;
|
||||
|
||||
|
@ -187,6 +187,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||
|
||||
lock (mConnectionList)
|
||||
{
|
||||
conn.disconnect();
|
||||
mConnectionList.Remove(conn);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue