core icon indicating copy to clipboard operation
core copied to clipboard

IDLE keepalives are not sent frequently enough on Android when the app is suspended

Open link2xt opened this issue 11 months ago • 0 comments

Delta Chat attempts to interrupt IDLE every 5 minutes: https://github.com/deltachat/deltachat-core-rust/blob/81e9628ab79941adaa12de1e30cefb8d8d69b3f9/src/imap/idle.rs#L14-L20

However, this does not seem to happen because monotonic clock used almost everywhere does not advance when the app is suspended and boottime clocks which should be used instead are not available in Rust yet:

  • https://github.com/tokio-rs/tokio/issues/3185
  • https://github.com/rust-lang/rust/issues/71860
  • https://github.com/rust-lang/rust/pull/132331

FairEmail apparently does not have such problems, but it is using Java APIs everywhere: https://github.com/deltachat/deltachat-core-rust/issues/6532#issuecomment-2650490127

The bug can be worked around by reducing imap_idle_notify_interval in Dovecot, but we need a fix on the client side: https://github.com/deltachat/deltachat-core-rust/issues/6532#issuecomment-2650490213

link2xt avatar Feb 11 '25 21:02 link2xt