From 290440f4bdd66facdf52d10e2c98330da284b77f Mon Sep 17 00:00:00 2001 From: cyan <> Date: Tue, 12 Jun 2007 00:58:58 +0000 Subject: [PATCH] * Remove detection of whether socket_select() is supported or not, as it has been supported in Synchronet for quite some time, now. * Force a wait of 1 second if there are no clients or servers connected to the IRCd, fixing the 100% CPU usage bug under Win32. Bug reported by Lord Time on DOVE-Net. Thanks! --- exec/ircd.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exec/ircd.js b/exec/ircd.js index 4765a53ad9..beca66b11c 100644 --- a/exec/ircd.js +++ b/exec/ircd.js @@ -253,7 +253,7 @@ while (!server.terminated) { } // do some work. - if (this.socket_select!=undefined) { + if (Selectable_Sockets.length) { var readme = socket_select(Selectable_Sockets, 1 /*secs*/); try { for(thisPolled in readme) { @@ -280,6 +280,8 @@ while (!server.terminated) { + Global_CommandLine); terminate_everything("A fatal error occured!", /* ERROR? */true); } + } else { + mswait(1000); } // Scan C:Lines for servers to connect to automatically. -- GitLab