From: Markus Armbruster Date: Tue, 27 Mar 2012 17:21:38 +0000 (+0200) Subject: Start player thread shutdown grace time at shutdwn() entry X-Git-Tag: v4.3.30~18 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=86f029457300e29749d19a098ab15bdd2c1dfd5d Start player thread shutdown grace time at shutdwn() entry Before, it was started after all commands aborted. Shouldn't make a difference in practice, as command abortion is supposed to be quick. --- diff --git a/src/server/main.c b/src/server/main.c index 44dbd626d..a3010419c 100644 --- a/src/server/main.c +++ b/src/server/main.c @@ -406,7 +406,7 @@ void shutdwn(int sig) { struct player *p; - time_t now; + time_t now = time(NULL); int i; logerror("Shutdown commencing (cleaning up threads.)"); @@ -425,7 +425,6 @@ shutdwn(int sig) } empth_rwlock_wrlock(play_lock); - now = time(NULL); empth_yield(); for (i = 1; i <= 3 && player_next(NULL); i++) { logerror("Waiting for player threads to terminate\n");