Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

Smack Keep Alive Packet Delay after login in

$
0
0

I am developing a instant chat app on Android using smack API. I set the KeepAliveInterval to 2 seconds using the following code:

 

SmackConfiguration.setKeepAliveInterval(2000);

 

However, I checked the log and found that KeepAliveInterval was not sent out until nearly 20 seconds after I logged in. I used Openfire as server and set the idle disconnection threshold to 15 seconds. So my client was disconnected before the first keep alive packet was sent out.

 

The app I am developing requires real-time monitoring of user presence, so I cannot reduce the idle disconnection threshold, the only option for me is to set the KeepAliveInterval to a small value.

 

Can anyone help me with this? Thanks.


Viewing all articles
Browse latest Browse all 10742

Trending Articles