Idle Connection not disconnecting according to the second set

I have set the Idle connection Policy to disconnect clients after they have been idle for 1 second and checked the Do not send XMPP Ping.

Under server setting tab, client connections.

I then connect a user, and i can see the user session connected(straight away) in the Sessions, Active session. I then just close the browser(user chat) without logging out, but i still see the user’s session in the Client Session panel after 2-3 minutues… i am not sure why.

If i manually disconnect the session, then it disappears straight away. But not when i use the idle connection.

If you disable xmpp ping then Openfire has no way to check if connection is still active. Also, setting it to 1 second is a bit extreme. You can have sporadic disconnects of active clients if a ping for some reason won’t get back in 1 seconds. Try 10 seconds for testing.

Thanks for the reply! I just tested it, i set the time to 10 seconds, its been 1/2 min, it is still connected.

I am just wondering if i set the time to 10 seconds, if internet dies for the user after 1 second and someone sends the user messages, would those messages still get into the offline messages for the user? Or would those messages be lost?

Those messages will be lost. So, have you tried to enable xmpp ping? For me it works fine and disconnects idle session after ~10 seconds.

Explanation: options to mitigate messages loss because of network problems

Ahh… if those messages will be lost, i guess i might have to set the time to be shorter and somehow make sure the messages are captured.

Yer i tried enabling the xmpp ping, it still doesnt work, i am not sure if i need another plugin enabled or something to have that to work… but it isnt working for me, i still have to wait for like 2/3 mins…

What client do you use? It works with Spark. A client should respond to ping, either with a proper reply or at least with an error.

I am connecting Openfire with Strophe.js. But even if there is no proper ping respond, it should then automatically disconnect the connection right? I am purposely testing it with no ping respond at the moment.

Well, can’t comment on that anything more. Not a developer myself, but as i said this works fine with Spark. When i tried to set low idle value when we were still using Exodus client, then clients started to disconnect and reconnect like hell, because Exodus didn’t supported ping. Maybe when you close browser a tcp connection is still alive. Try pulling out the network cord for testing network loss. That’s how i test.

Hi Thanks, yer i can’t test that at the moment, because i am running on the localhost. But thanks for the advices! I will see what i can do.