mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-09-27 12:01:10 -05:00
Stop GT server from eating CPU.
This commit is contained in:
@@ -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[]
|
||||
|
||||
Reference in New Issue
Block a user