From db6fd8dad261f04fbd991b1d4d8456277b3d7158 Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Sat, 23 Jul 2005 13:37:36 +0000 Subject: [PATCH] (player_main): Add empth_yield() in the command processing loop to ensure after every command, other players gets a chance to execute a command. This prevents denial of service attack that monopolizing the active server thread by continuing feeding data to the server from a client. --- src/lib/player/player.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/player/player.c b/src/lib/player/player.c index abf188784..aa0f358cd 100644 --- a/src/lib/player/player.c +++ b/src/lib/player/player.c @@ -136,6 +136,7 @@ player_main(struct player *p) if (command() == 0 && !player->aborted) break; player->aborted = 0; + empth_yield(); } /* #*# I put the following line in to prevent server crash -KHS */ natp = getnatp(player->cnum); -- 2.43.0