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.
This commit is contained in:
parent
786e2a99d5
commit
86f0294573
1 changed files with 1 additions and 2 deletions
|
@ -406,7 +406,7 @@ void
|
||||||
shutdwn(int sig)
|
shutdwn(int sig)
|
||||||
{
|
{
|
||||||
struct player *p;
|
struct player *p;
|
||||||
time_t now;
|
time_t now = time(NULL);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
logerror("Shutdown commencing (cleaning up threads.)");
|
logerror("Shutdown commencing (cleaning up threads.)");
|
||||||
|
@ -425,7 +425,6 @@ shutdwn(int sig)
|
||||||
}
|
}
|
||||||
empth_rwlock_wrlock(play_lock);
|
empth_rwlock_wrlock(play_lock);
|
||||||
|
|
||||||
now = time(NULL);
|
|
||||||
empth_yield();
|
empth_yield();
|
||||||
for (i = 1; i <= 3 && player_next(NULL); i++) {
|
for (i = 1; i <= 3 && player_next(NULL); i++) {
|
||||||
logerror("Waiting for player threads to terminate\n");
|
logerror("Waiting for player threads to terminate\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue