Commit 3bd2679c authored by Dave Cridland's avatar Dave Cridland

Merge pull request #482 from VicoWu/master

solve the memory leak problems which is caused by add LocalMUCRoom ob…
parents dff3bb1b b366b1d7
......@@ -51,6 +51,7 @@ import org.jivesoftware.openfire.disco.DiscoItem;
import org.jivesoftware.openfire.disco.DiscoItemsProvider;
import org.jivesoftware.openfire.disco.DiscoServerItem;
import org.jivesoftware.openfire.disco.ServerItemsProvider;
import org.jivesoftware.openfire.event.GroupEventDispatcher;
import org.jivesoftware.openfire.group.ConcurrentGroupList;
import org.jivesoftware.openfire.group.GroupAwareList;
import org.jivesoftware.openfire.group.GroupJID;
......@@ -765,6 +766,9 @@ public class MultiUserChatServiceImpl implements Component, MultiUserChatService
private void removeChatRoom(String roomName, boolean notify) {
MUCRoom room = rooms.remove(roomName);
Log.info("removing chat room:" + roomName + "|" + room.getClass().getName());
if (room instanceof LocalMUCRoom)
GroupEventDispatcher.removeListener((LocalMUCRoom) room);
if (room != null) {
totalChatTime += room.getChatLength();
if (notify) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment