tigase-extension
tigase-extension copied to clipboard
Ack timeout disconnection doesn't trigger push notification
When an ack for a delivered message expires, the server disconnects the client. The message is saved to the offline storage and the push notification is not sent. Investigate use of postProcess() by the push plugin because in some cases (see: redelivery) it might not be invoked.
~~ClientConnectionManager.processUndeliveredPacket might be called with null stamp in a few cases (including server-induced socket close), in those cases the packet will be filled with a C2SDeliveryError element without a stamp attribute. After that, the packet will be blocked by C2SDeliveryErrorProcessor.preProcess because of this:~~
String delay = deliveryError.getAttributeStaticStr("stamp");
if (delay == null)
return true;
~~This will block processing by the push notifications module which uses postProcess.~~ ~~Find out why the postProcess is blocked (not called or some conditions inside fail?)~~
Further analysis revealed that messages actually go through, but the app is unable to send the receipt back. So the sender sees the message as not delivered, and a push notification is not sent because the recipient did acknowledged the message to the server.
It happened again: a message was sent but the push notification was not sent, probably because the server thought the user was still online. However:
- last ping verification had been almost 1 hour and a half before the message
- client disconnected voluntarily more than 1 hour before the message
Putting aside the fact that the client disconnection wasn't received by the server, last ping was 1h24m before the message was received, yet the watchdog didn't come into action. Assuming the watchdog was working correctly, we may assume that either:
- the offline messages mechanism didn't work somehow
- sender client didn't send the message or there was some problem on the sending side
- the packet was lost somewhere in the delivery chain