简体   繁体   中英

XMPP client network failure and Openfire offline message

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?

I found a solution, not sure if it is efficient.

In Openfire admin portal, under Client Connection Settings->Idle Connections Policy, there is an option to disconnect the client if it is idle for x seconds. By default it is 360 seconds, i have changed it to 5 seconds so that the messages won't get lost.

I am not sure if its a good idea to ping the clients every 5 seconds.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM