Client confirms successful sent of a message while message is lost (#115)
In QA
Andrzej Wójcik (Tigase) opened 1 year ago

Client returns from the send method (when sending stanza other than <iq/>) when stanza is written successfully to the socket. However, it may happen that stanza (ie. <message/>) is written to the socket buffer but due to networking issues, it is not delivered to the server. If resumption fails that message will be lost.

To solve that XEP-0198: Stream Management was created and implemented, however, method there is no way to check (or get notified) that <message/> or any other stanza was successfully sent and delivered to the server.

This issue is especially important for <message/> stanzas, as:

  • <iq/> are expecting answer, so they will be notified by the callback that remote server has timed out (or we were disconnected),
  • <presence/> stanzas are usually resent and state is properly reestablished after reconnection.

This issue may cause clients to present message as sent, while it was actually not delivered to the server and will not be tried to be resend.

Andrzej Wójcik (Tigase) commented 1 year ago

I've modified implementation of sending messages, so that execution of send method with messages passed as a parameter will not return until message is acknowledged by the server. That is similar approach to the execution of send method with iqs, as then this method returns when client receives a response for the request.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
4.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_libraries/Martin#115
Please wait...
Page is in error, reload to recover