mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-08-01 15:42:56 -05:00
Stop GT server from eating CPU.
This commit is contained in:
parent
4f8376ec3e
commit
ddfeebbd40
|
|
@ -96,13 +96,13 @@ namespace PkmnFoundations.GlobalTerminalService
|
|||
{
|
||||
if (!m_listener.Pending())
|
||||
{
|
||||
Thread.Sleep(5);
|
||||
Thread.Sleep(10);
|
||||
continue;
|
||||
}
|
||||
Stream s = AcceptRequest();
|
||||
if (s == null)
|
||||
{
|
||||
Thread.Sleep(5);
|
||||
Thread.Sleep(10);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.ServiceProcess;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace PkmnFoundations.GlobalTerminalService
|
||||
{
|
||||
|
|
@ -16,7 +17,7 @@ namespace PkmnFoundations.GlobalTerminalService
|
|||
#if DEBUG
|
||||
Service1 myService = new Service1();
|
||||
myService.Start();
|
||||
while (true) { }
|
||||
while (true) { Thread.Sleep(1000); }
|
||||
#else
|
||||
ServiceBase[] ServicesToRun;
|
||||
ServicesToRun = new ServiceBase[]
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user