(player_kill_idle): Don't kill hung player threads. That code was
flawed. Firstly, when player_kill_idle() ran before the player thread could react to being aborted by update or shutdown, player_kill_idle() incorrectly diagnosed it as hung. Secondly, terminating hung threads leaks resources and can leave a stale play_lock behind. It could perhaps even corrupt game state. It might salvage some scenarios, but makes others worse. Not worth it.
This commit is contained in:
parent
d500a7071c
commit
043015e829
2 changed files with 4 additions and 15 deletions
|
@ -385,7 +385,6 @@ shutdwn(int sig)
|
|||
empth_wakeup(p->proc);
|
||||
}
|
||||
empth_rwlock_wrlock(play_lock);
|
||||
/* rely on player_kill_idle() for killing hung player threads */
|
||||
if (sig)
|
||||
logerror("Server shutting down on signal %d", sig);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue