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

Connectivity status is always displayed as "Connecting" when the server does not support IDLE #4797

Closed
link2xt opened this issue Oct 6, 2023 · 1 comment
Assignees
Labels
blocker bug Something is not working

Comments

@link2xt
Copy link
Collaborator

link2xt commented Oct 6, 2023

When the server does not support IDLE, core takes the following path at the end of synchronizing seen flags:

connection.connectivity.set_connected(ctx).await;
ctx.emit_event(EventType::ImapInboxIdle);
if let Some(session) = connection.session.take() {
if !session.can_idle() {
info!(
ctx,
"IMAP session does not support IDLE, going to fake idle."
);
return connection
.fake_idle(ctx, Some(watch_folder), folder_meaning)
.await;
}

Connectivity is set to "Connected", then we go into fake_idle.

Normal idle does not change connectivity, while fake_idle calls prepare here:

// try to connect with proper login params
// (setup_handle_if_needed might not know about them if we
// never successfully connected)
if let Err(err) = self.prepare(context).await {
warn!(context, "fake_idle: could not connect: {}", err);
continue;
}

prepare calls connect which in turn changes the connectivity to connecting:

self.connectivity.set_connecting(context).await;

However, nobody sets the connectivity to connected for the whole fake idle duration, so most of the time "connecting" is displayed.

For a fix it should be sufficient to set the status to connected at the end of connect. For testing we probably need an option to disable use of IDLE and maybe even add it to developer options on desktop.

163.com does not support IDLE.
Forum thread: https://support.delta.chat/t/cannot-connect-to-the-inbox-after-logging-into-163-mailbox/2756

@link2xt link2xt added the bug Something is not working label Oct 6, 2023
@link2xt
Copy link
Collaborator Author

link2xt commented Oct 8, 2023

As a first step, adding an option to disable IDLE manually: #4803
Corresponding desktop PR: deltachat/deltachat-desktop#3427

Actual fix: #4804

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Something is not working
Projects
None yet
Development

No branches or pull requests

1 participant