Notify all chat rooms that server is going to restart.
This commit is contained in:
@@ -23,6 +23,11 @@ public class ChatServer extends AbstractServer {
|
||||
return chatRoom;
|
||||
}
|
||||
|
||||
public void sendSystemMessageToAllChatRooms(String message) {
|
||||
for (ChatRoomMediator chatRoomMediator : _chatRooms.values())
|
||||
chatRoomMediator.sendMessage("System", message, true);
|
||||
}
|
||||
|
||||
public ChatRoomMediator getChatRoom(String name) {
|
||||
return _chatRooms.get(name);
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ public class HallServer extends AbstractServer {
|
||||
if (shutdown) {
|
||||
cancelWaitingTables();
|
||||
cancelTournamentQueues();
|
||||
_chatServer.sendSystemMessageToAllChatRooms("System is entering shutdown mode and will be restarted when all games are finished");
|
||||
}
|
||||
} finally {
|
||||
_hallDataAccessLock.writeLock().unlock();
|
||||
|
||||
Reference in New Issue
Block a user