-
Notifications
You must be signed in to change notification settings - Fork 13
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
send-error message not always sent / wrong order #77
Comments
Related: threema-ch/threema-web#505 |
Okay, so I pinned it down: The problem is that we cannot determine which message has been lost, or in fact whether a message has been lost at all in all circumstances. As an example:
To summarise: We do not know where the stream has been cut off. Thus we cannot (and this is very important to grasp) reliably tell that no data has been lost unless the connection to the other peer has been closed gracefully. Because of this, we may need to re-evaluate the usefulness of /cc @dbrgn |
This issue is still open since I still need to fix that a |
Do not cancel the task loop but wait for it and only kill it after 10 minutes of inactivity (useful for finding faulty tasks) Explicitly log that a relayed message has been sent (well, at least on a socket level) Fix always send `send-error` messages first before sending a `disconnected` message, see #77 Add a test for the case where a message is being relayed but the connection has been lost
When a relay message is being enqueued (as a task from id
0x01
) and the subsequent ping (to0x02
) times out, the resultingPingTimeoutError
(on a task of0x02
) for some reason prevents thesend-error
routine from being called.The relay send task on
0x02
is cancelled and the relay task waiting for the send task to complete on0x01
doesn't get that information.The text was updated successfully, but these errors were encountered: