Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ack timeout disconnection doesn't trigger push notification #87

Open
daniele-athome opened this issue Feb 7, 2018 · 2 comments
Open
Assignees
Labels
Milestone

Comments

@daniele-athome
Copy link
Member

daniele-athome commented Feb 7, 2018

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.

@daniele-athome daniele-athome self-assigned this Feb 7, 2018
@daniele-athome daniele-athome added this to the 1.0 milestone Feb 7, 2018
@daniele-athome daniele-athome changed the title Ack timeout disconnection doesn't trigger client retry Ack timeout disconnection doesn't trigger push notification Feb 20, 2018
@daniele-athome
Copy link
Member Author

daniele-athome commented Feb 20, 2018

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.

@daniele-athome
Copy link
Member Author

daniele-athome commented May 6, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant