Skip to content

Simplify handling of dead connections to make it more robust.#243

Open
altruizine wants to merge 1 commit into
OfflineIMAP:masterfrom
altruizine:upstream-reopen-dead-conn-fix
Open

Simplify handling of dead connections to make it more robust.#243
altruizine wants to merge 1 commit into
OfflineIMAP:masterfrom
altruizine:upstream-reopen-dead-conn-fix

Conversation

@altruizine
Copy link
Copy Markdown
Contributor

This PR

  • I've read the DCO.
  • I've read the Coding Guidelines
  • The relevant informations about the changes stands in the commit message, not here in the message of the pull request.
  • Code changes follow the style of the files they change.
  • Code is tested (provide details).

References

Additional information

This issue surfaced with the fix in #241.

IMAPServer.acquireconnection: If connection turns out to be dead,
release and recursively reacquire it.

It turns out that the fix in 680d874
was not sufficient and perhaps a bit over-engineered: It resulted in
prolonged unhealthy sockets. This new fix uses the same basic idea
(call acquireconnection recursively to return a healthy socket) but
simply and unceremoniously calls releaseconnection on the unhealthy
one. How, unhealthy sockets are detected and fixed quickly.

Signed-off-by: Michael Hohmuth <hohmuth@sax.de>
@thekix
Copy link
Copy Markdown
Member

thekix commented May 15, 2026

I made a lot of changes in this version about connectivity issues. I will include this patch in the next version (this change is very disruptive). Thanks for your patch @altruizine

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.

2 participants