I am using openfire version 3.4.5 and using system.client.idle equal to 60000 to kick out idle users after one minute but it is not working properly.
I used a normal client, connected to the server and pulled out my network cable from the computer but user is still appearing in session tab(even after 5 hrs) and also restarting the openfire did not remove them.
Now I am using version 3.5.0 and if I use xmpp.client.idle equal to 30000 it works but setting the value higher than this doesn’t work.
Now I observed one more thing If I set xmpp.client.idle property and then I try to get the presence( using multiUserChat.getOccupantPresence(userJid)) of logged in users in conference then It gives the presence null. If I do not set this property then it gives the presence.
so when you reboot the server all clients applications have been quit (not just closing the windows, as many do not quit when you do this)? if that is the case there is definitely no way the session would remain on reboot unless there is an error with your install.
No clue what would cause this behavior. All I can tell you is that a restart of openfire will cause all sessions to be disconnected. They will reconnect automatically if the client has the ability to do so (Spark can).
Hello guys, for anyone who is still having issues with idle sessions, here is a quick fix solution while waiting for the xmpp.client.idle bug to be solved.
Expose a servlet in openfire. Use one of the opensource plugin as example to do that and add a check there to verify that the session has not been idle for too long.
i.e
if((System.currentTimeMillis() - lastActive.getTime()) > 120000 ){ // This checks that the session was not idle for more than 2mins.
//Kill session
}else{
//don’t kill
}
Write a nice little timer bean and call that servlet from there.
This seems to do the job for the mean time. It is not perfect but I can’t risk it and wait for other people to fix the issues. Somehow, I was forced to get dirty.