powered by Jive Software

Openfire showing online to an offline user

I am developin a chat application in Android and everything is working fine but if a user losses the connection due to network problem then also Openfire is showing the status as online which resulting in message packet loss.How can I overcome this problem.