I’'m in the process of writing a chat app. It uses smack to talk to openfire as a way to get users on my system talking on their msn/aim/etc using the gateway plugin.
We’'re using smack 3, and openfire 3.3.
openfire times users out after 6 minutes of being idle. (http://www.igniterealtime.org/issues/browse/JM-1019).
It is perfectly feasible that my users will idle for any length of time, so as a way to remedy this i added a “ping” method to my code. Every 2.5minute my code sends out a Presence stanza of Available. After two such pings MSN disconnects the user with the following message
2007.06.03 08:58:27 session 19 caught exception java.io.IOException: Connection reset by peer
2007.06.03 08:58:27 MSN: Exception occurred for firstname.lastname@example.org : java.io.IOException: Connection reset by peer
2007.06.03 08:58:27 MSN: IO error: java.io.IOException: Connection reset by peer
2007.06.03 08:58:27 msn: Sending packet:
I tried with AIM, no such issue.
So it would seem MSN have some sort of limit on the number of bad stanza’'s they support?
Regardless of the actual issue in the gateway plugin what is the recommended way to ping openfire to keep the session active?