Closed
Bug 485995
Opened 16 years ago
Closed 16 years ago
not closing imap connections on shutdown
Categories
(MailNews Core :: Backend, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 3.0b3
People
(Reporter: Bienvenu, Assigned: Bienvenu)
References
Details
Attachments
(1 file)
798 bytes,
patch
|
standard8
:
review+
neil
:
superreview+
|
Details | Diff | Splinter Review |
We're no longer closing our connections to the imap server gracefully on shutdown. In particular, we're not logging out or closing (in the imap protocol sense). I suspect this makes gmail in particular lose state changes, but in general, many imap servers would have an issue with this behavior.
This may have been caused by the changes I made to make imap closing happen on the IMAP thread, instead of blocking the UI thread. We attempt to close imap connections on shutdown when we get the notification that we're going offline. When we examine the transports for our cached imap connections, none of them are alive, I believe because necko has killed them as part of the shutdown process.
I believe moving closing of cached connections much earlier in the shutdown process would help with this a lot. I prefer that to the alternative of leaving it where it is but blocking the ui thread while the connections are closed. I'll see how feasible it is to know earlier that we're shutting down.
Assignee | ||
Updated•16 years ago
|
Status: NEW → ASSIGNED
Flags: blocking-thunderbird3+
Target Milestone: --- → Thunderbird 3.0b3
Assignee | ||
Comment 1•16 years ago
|
||
this makes us close cached connections right after we finish things we do on exit, like emptying trash or expunging inbox.
I'm not quite sure how happy SeaMonkey will be with this, since this code is triggered by the last mail window getting closed, from nsMsgMailSession.cpp. I could #ifdef MOZ_THUNDERBIRD it if SM would prefer - though I know there's always a debate about whether all of mailnews should be shutdown in SM after the last mail window is closed, or whether it should all be running and checking for new mail.
Attachment #370066 -
Flags: superreview?(neil)
Attachment #370066 -
Flags: review?(bugzilla)
Comment 2•16 years ago
|
||
Comment on attachment 370066 [details] [diff] [review]
close cached connections right after shutdown tasks
We call this on exit? Seems to me that we call this every time we close a standalone message window. I guess you don't bother with them any more?
Assignee | ||
Comment 3•16 years ago
|
||
(In reply to comment #2)
> (From update of attachment 370066 [details] [diff] [review])
> We call this on exit? Seems to me that we call this every time we close a
> standalone message window. I guess you don't bother with them any more?
We should only be calling it when the window count on the mail session goes to 0
if (!mWindows.Count())
http://mxr.mozilla.org/comm-central/source/mailnews/base/src/nsMsgMailSession.cpp#379
Comment 4•16 years ago
|
||
Comment on attachment 370066 [details] [diff] [review]
close cached connections right after shutdown tasks
Oh right, I didn't see that bit. Well, I guess if we're already emptying the trash or whatever, closing cached connections can't do any more harm.
Attachment #370066 -
Flags: superreview?(neil) → superreview+
Assignee | ||
Comment 5•16 years ago
|
||
Yes, that's my thinking as well.
Updated•16 years ago
|
Attachment #370066 -
Flags: review?(bugzilla) → review+
Assignee | ||
Comment 6•16 years ago
|
||
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•