#1334 Faster indication of a disconnected client when delivering a message
Description of feature:
with smacks enabled, it can take more than 15 minutes to detect that a (mobile) client lost connection. This could be solved by frequent pinging of the client by the server, but this comes with a cost of a battery drain on the client's side.
However, if a message is being delivered to the client, the client has to wake up from sleep anyway (if still connected) and this is the moment, when the sender would appreciate the information about the client's availability the most. So, one could maybe ask the client to ack the message and, if no ack is received within some time limit, close the client's connection and notify the sender somehow, at least by showing the client offline.
probably one would not need to ask ack after each message but, let's say, wait for a few seconds and send one ack request for possibly more messages send during that time. But
maybe this should be done shortly after the message delivery, because the client might go back to sleep and the ack request would force it to wake up again?
If I send a message to a contact who lost connection just a moment ago (e.g. left the office, his/her mobile phone lost the wifi signal and did not reconnect by any other means), it might take more than 15 minutes until I am notified that something went wrong. It would be convenient, if the server could detect this situation and notify the sender earlier.
My thinking here is that we don't want to timeout the client sooner (there are benefits to keeping them online if it's just a temporary disconnect).
However it would be good to signal that a disconnect has happened, using something like https://xmpp.org/extensions/xep-0310.html
It would need client support to actually display the disconnection, but it should be easy to implement.
I'm currently working on XEP-0198 support, which would be a natural place to add this.
titlefaster detection of a disconnected client when delivering a message