diff --git a/src/main/java/cn/CSUOSA/ChattingRoomServer/Main.java b/src/main/java/cn/CSUOSA/ChattingRoomServer/Main.java index d35bf25..6ecf4a6 100644 --- a/src/main/java/cn/CSUOSA/ChattingRoomServer/Main.java +++ b/src/main/java/cn/CSUOSA/ChattingRoomServer/Main.java @@ -23,6 +23,7 @@ public class Main public static ConcurrentHashMap ChannelList; public static ConcurrentHashMap MsgList; public static UserMapTimer userMapTimer = new UserMapTimer(); + public static MessageListThread msgListCleaner = new MessageListThread(); public static Terminal terminal; public static LineReader lineReader; public static long msgCount = 0; @@ -41,6 +42,7 @@ public static void main(String[] args) CAC = SpringApplication.run(Main.class, args); //启动SpringBoot new Thread(userMapTimer).start(); //启动昵称占用计时器 + new Thread(msgListCleaner).start(); //启动主消息队列维护线程 try { @@ -60,4 +62,4 @@ public static void main(String[] args) new Thread(new CmdProcessor()).start(); } -} \ No newline at end of file +}