Commit 06124b7c authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Remove MUCUser with no MUCRoles even if kick idle user is disabled. This fixes...

Remove MUCUser with no MUCRoles even if kick idle user is disabled. This fixes small memory leak. JM-1251

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@9799 b35dd754-fafc-0310-a699-88a17e54d16e
parent d10b1b0d
......@@ -327,20 +327,20 @@ public class MultiUserChatServerImpl extends BasicModule implements MultiUserCha
}
private void checkForTimedOutUsers() {
// Do nothing if this feature is disabled (i.e USER_IDLE equals -1)
if (user_idle == -1) {
return;
}
final long deadline = System.currentTimeMillis() - user_idle;
for (LocalMUCUser user : users.values()) {
try {
if (user.getLastPacketTime() < deadline) {
// If user is not present in any room then remove the user from
// the list of users
if (!user.isJoined()) {
removeUser(user.getAddress());
continue;
}
// Do nothing if this feature is disabled (i.e USER_IDLE equals -1)
if (user_idle == -1) {
return;
}
if (user.getLastPacketTime() < deadline) {
// Kick the user from all the rooms that he/she had previuosly joined
MUCRoom room;
Presence kickedPresence;
......
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