Offline messages are not stored if target user is in airplane mode

I am building an android client for XMPP (with Smack 4.2.3), working with Openfire 4.2.2 as a server.
I have set Openfire Offline Messages to: Always Store.
When client “A” turns on Airplane Mode, it doesn’t log off properly from the server, and thus Openfire still thinks A is online. (It will understand this user is offline only after 5 minutes, as configured in “Idle Connections Policy”)
Now, when I send a message from client “B” to client “A” while Openfire still thinks “A” is online, Openfire does not store this message as an offline message, then when client “A” goes back online, the message gets lost in space…

I know I can set the “Idle Connections Policy” to a smaller interval, but it seems “unhealthy” to set this to 10 seconds, and even if so, the same will happen with messages sent within these 10 seconds…

How can I solve this situation?
Thanks