Log server shutdown using actionstream (#7589)

master
ClobberXD 2018-07-28 16:28:02 +05:30 committed by SmallJoker
parent d7d451c647
commit e8aad2ee00
1 changed files with 2 additions and 1 deletions

View File

@ -236,7 +236,6 @@ Server::Server(
Server::~Server()
{
infostream << "Server destructing" << std::endl;
// Send shutdown message
SendChatMessage(PEER_ID_INEXISTENT, ChatMessage(CHATMESSAGE_TYPE_ANNOUNCE,
@ -261,6 +260,8 @@ Server::~Server()
m_env->kickAllPlayers(SERVER_ACCESSDENIED_SHUTDOWN,
kick_msg, reconnect);
}
actionstream << "Server: Shutting down" << std::endl;
// Do this before stopping the server in case mapgen callbacks need to access
// server-controlled resources (like ModStorages). Also do them before