IMAPS connections alive after Mailspring closure

Problem

As stated in the title, closing the client does not immediately close IMAPS connections. You need to wait 1-2 min.
As if the client didn’t send the FIN signal.

Context

Always

Email Provider

posteo.de and mailo.com

Setup

  • OS and Version: Arch
    • Installation Method: AUR
  • Mailspring Version: mailspring-bin 1.15.0-1

Thanks for the careful report. This is expected, if a little untidy: on quit, the app stops the sync process with SIGTERM and the process doesn’t send an IMAP LOGOUT first, so the kernel sends the FIN and the socket sits in FIN_WAIT_2 until the server’s IDLE connection notices — typically 60 s (tcp_fin_timeout). Nothing is left running on your machine and the server side times out on its own. A graceful LOGOUT on shutdown is a reasonable improvement, but it’s cosmetic, so I’m closing this rather than tracking it as a bug.