Skip to content

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented Oct 10, 2025

Closes #7290

@link2xt link2xt force-pushed the link2xt/non-call-in-reply-to branch 2 times, most recently from 8339571 to 87efbb7 Compare October 10, 2025 22:28
@link2xt link2xt marked this pull request as draft October 10, 2025 23:18
@link2xt link2xt force-pushed the link2xt/non-call-in-reply-to branch from 87efbb7 to a123432 Compare October 11, 2025 00:04
@link2xt link2xt marked this pull request as ready for review October 11, 2025 00:11
@link2xt
Copy link
Collaborator Author

link2xt commented Oct 11, 2025

First two commits have a test. Third does not because it is only to prevent IMAP loop from getting stuck in a loop if there is another unexpected bug.

Copy link
Collaborator

@iequidoo iequidoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least the first commit looks good to me, but to prevent more breakages like this blocker bug, probably all are fine as a temporary solution

src/imap.rs Outdated
.await?
.await
{
Err(err) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't happen at all normally, but only if there are I/O errors or the context itself is in some broken state. But such a fix is fine as a temporary solution

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed third commit that ignores errors, will merge without it.

In this case the problem was that ensure error was bubbled up, hopefully there are no such similar problems. At least we will be able to debug them if they are not ignored.

}

if mime_parser.is_call() {
if is_partial_download.is_none() && mime_parser.is_call() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, instead of this i'd suggest to only parse minimum set of headers in mimeparser for partial downloads. Otherwise it's hard (not possible in practice) to always check this is_partial_download for all kinds of functionality we have like calls, webxdcs, etc.

@link2xt link2xt force-pushed the link2xt/non-call-in-reply-to branch from a123432 to 04fa37e Compare October 12, 2025 14:11
… non-call Message-ID

In-Reply-To may refer to non-call message
as we do not control the sender.
It may also happen that call message
was received by older version and processed
as text, in which case correct In-Reply-To
appears to be referring to the text message.
Any control information from the message
should only be downloaded when the message
is fully downloaded to avoid processing it twice.
Besides, "partial" messages may actually be full messages
with an error that are only processed as partial
to add a message bubble allowing to download the message later.
@link2xt link2xt force-pushed the link2xt/non-call-in-reply-to branch from 04fa37e to aa8a242 Compare October 12, 2025 14:16
@link2xt link2xt enabled auto-merge (rebase) October 12, 2025 14:20
@link2xt link2xt merged commit cc54a3f into main Oct 12, 2025
53 of 54 checks passed
@link2xt link2xt deleted the link2xt/non-call-in-reply-to branch October 12, 2025 17:20
@r10s r10s moved this to Done in Calls Oct 13, 2025
@r10s r10s added this to Calls Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IMAP loop stuck in infinite loop failing to receive_imf a message

2 participants