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:
parent
f566c14ea0
commit
7834b737eb
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue