Prevent deadlock in IMAPServer.close when using 'maxsyncaccounts' and 'maxconnections'.#241
Open
altruizine wants to merge 1 commit intoOfflineIMAP:masterfrom
Open
Prevent deadlock in IMAPServer.close when using 'maxsyncaccounts' and 'maxconnections'.#241altruizine wants to merge 1 commit intoOfflineIMAP:masterfrom
altruizine wants to merge 1 commit intoOfflineIMAP:masterfrom
Conversation
… 'maxconnections'. We introduce a separate closing flag that's checked in acquireconnection, decoupling the connectionlock from the semaphore such that they can be acquired separately. Signed-off-by: Michael Hohmuth <hohmuth@sax.de>
Member
|
PR to testing. Please, check it :-) Thanks! |
Contributor
Author
|
I'll run the testing branch for a day or two and report back. Thanks! |
5 tasks
Contributor
Author
|
The fix works fine on the testing branch but surfaces an issue with the new mechanism that attempts to fix unhealthy sockets. I'm proposing a new solution (tested, works for me) in #243. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We introduce a separate closing flag that's checked in acquireconnection, decoupling the connectionlock from the semaphore such that they can be acquired separately.
This is work towards getting rid of the 'maxsyncaccounts' / 'maxconnections' deprecation warning in the manual.
This PR
References
Additional information
I'm using this change in production with 'maxsyncaccounts' and 'maxconnections' both set to values > 1, as well as with autorefresh set. This change allows recovery from connection hangs after network changes (such as resuming after system suspend).