aboutsummaryrefslogtreecommitdiffstats
path: root/code/server
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-08-18 01:50:51 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-08-18 01:50:51 +0000
commitf053285852be89ef4238b1a6682a63233501f342 (patch)
treef2e96d101bf89ef0b3ab747f9ad555104a7a2be1 /code/server
parent8f07dfd1a98d8a6128a731acd0ac3792579b216b (diff)
downloadioquake3-aero-f053285852be89ef4238b1a6682a63233501f342.tar.gz
ioquake3-aero-f053285852be89ef4238b1a6682a63233501f342.zip
Fix 100% CPU usage on idle dedicated servers.
git-svn-id: svn://svn.icculus.org/quake3/trunk@850 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/server')
-rw-r--r--code/server/sv_main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/code/server/sv_main.c b/code/server/sv_main.c
index c2ae710..152ecbd 100644
--- a/code/server/sv_main.c
+++ b/code/server/sv_main.c
@@ -777,7 +777,15 @@ void SV_Frame( int msec ) {
return;
}
- if ( !com_sv_running->integer ) {
+ if (!com_sv_running->integer)
+ {
+ if(com_dedicated->integer)
+ {
+ // Block indefinitely until something interesting happens
+ // on STDIN.
+ NET_Sleep(-1);
+ }
+
return;
}