Closed Bug 1042197 Opened 10 years ago Closed 10 years ago

[Email] Close IMAP connection immediately after periodic sync

Categories

(Firefox OS Graveyard :: Gaia::E-Mail, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(blocking-b2g:2.0+, b2g-v2.0 fixed, b2g-v2.1 fixed)

RESOLVED FIXED
2.1 S1 (1aug)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: mcav, Assigned: mcav)

References

Details

Attachments

(1 file)

Assignee: nobody → m
Blocks: 1018828
Note for triage: this is a dependent bug of the formerly blocking bug 1018828. We converted that one to a meta bug and the actual work will happen here and the in the sibling bugs. Requesting blocking here for improvements to email sync stability in 2.0.
blocking-b2g: --- → 2.0?
blocking-b2g: 2.0? → 2.0+
This patch introduces two connection-killing behaviors: - After 30 seconds of not receiving any data from the IMAP connection, the connection is terminated. - After a folder is done with a connection, we check to see if there are (no pending connection requests && no pending server jobs). If not, kill the connection. I'm not 100% certain that this logic captures exactly what we're looking for, so please verify that that conditional is actually what care about. For testing the no-pending-jobs kill behavior, my initial pass at trying to update the expect_releaseConnection/expect_deadConnection expectations for each case proved somewhat complex because some tests hold slices open and others do not; presently I just added a flag to shut off the behavior for most unit tests, and added a test to verify the behavior (and flip on the flag) in test_imap_kill_unused_connections.
Attachment #8461089 - Flags: review?(bugmail)
I've fixed up the tests/nits per your feedback. Tests pass locally for me. Thanks!
Comment on attachment 8461089 [details] [review] Link to Github pull-request: https://github.com/mozilla-b2g/gaia-email-libs-and-more/pull/325 Looks great, thanks! Just two minor nits to fix before landing.
Attachment #8461089 - Flags: review?(bugmail) → review+
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: