1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-24 13:47:46 +00:00

Added sleep to packet thread to avoid cpu consumption.

This commit is contained in:
Filip Maj 2015-09-08 00:52:19 -04:00
parent f566c14ea0
commit 7834b737eb

View file

@ -8,6 +8,7 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace FFXIVClassic_Lobby_Server
@ -58,6 +59,12 @@ namespace FFXIVClassic_Lobby_Server
client.flushQueuedSendPackets();
}
}
//Don't waste CPU if isn't needed
if (mConnections.Count == 0)
Thread.Sleep(2000);
else
Thread.Sleep(100);
}
}