I have configured XMPP client (iOS) and Openfire , everything works just fine except that i am not able to handle the following situation.
- iOS client disconnects because of network failure.
- User is still logged in on the server because there is no way to disconnect(no network).
- Further messages are not stored in server because server thinks that the user is still logged in. Hence the messages are lost.
- Unable to send push notification by sender because the receiver(User) status is still online ( no network to send presence ).
How can i solve this issue?