IMAPS connections remain established when only the browser is running

NEW
Unassigned

Status

MailNews Core
Networking: IMAP
--
enhancement
14 years ago
9 years ago

People

(Reporter: phil, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1

I don't /think/ this is a dup; there are other bugs dealing with IMAP
connections hanging and whatnot, but I couldn't find any dealing with
connections just remaining open and working.

After starting a browser window and a mail/news window, doing some IMAPS work
with the mailer, and closing the mailer, netstat shows the imaps connections are
still fully established (not in a close/wait mode).

Presumably Moz is still checking for mail, and the little envelope in the
lower-left component bar will change when mail arrives?  I could see this being
described as a feature, but if I'd wanted to keep checking for mail, I'd've left
the mail app running!  :-)  I have to exit Mozilla completely to kill the
connections, which means I lose a lot of state in various tabs.


Reproducible: Always
Steps to Reproduce:
1. Open browser.  Open mailer.  Do stuff on IMAP server.
2. Close mailer.
3. IMAP connections remain open, therefore IMAP server doesn't shut down,
causing confusion on server end (and in one case, minor loss of data).


Actual Results:  
Nothing.  That's the problem.  :-)

Expected Results:  
IMAP connections should be dissolved.

Comment 1

14 years ago

*** This bug has been marked as a duplicate of 115349 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 2

14 years ago
(In reply to comment #1)
> 
> *** This bug has been marked as a duplicate of 115349 ***

It is?  That bug talks about tearing down connections in an improper order when
exiting Mozilla.  This bug is when Mozilla hasn't exited yet, only the mail app
id closed, and the commections are still fully established.

Comment 3

14 years ago
No, it's not a dup. It is, however, a feature. Check for new mail still works
while the mail window is closed and many people would get upset if it ceased to
work when you closed the mail window (it's not a separate app - if you want a
separate app, you should consider thunderbird). What you want is a pref that
says - shutdown mail when last mail window is closed, stop checking for new
mail, etc... For now, if you just toggle the offline button, it will close all
the connections.
Severity: critical → enhancement
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
(Reporter)

Comment 4

14 years ago
(In reply to comment #3)
> No, it's not a dup. It is, however, a feature. Check for new mail still works
> while the mail window is closed and many people would get upset if it ceased to
> work when you closed the mail window (it's not a separate app - if you want a
> separate app, you should consider thunderbird).

Unfortunately, thunderbird doesn't do everything I need out of a mail app.
(Neither does mozilla, but it does a bit more, and until mutt+imaps works
again, mozilla works well enough.)


> What you want is a pref that
> says - shutdown mail when last mail window is closed, stop checking for new
> mail, etc... 

That would be perfect.


> For now, if you just toggle the offline button, it will close all
> the connections.

Cool, thanks.

Comment 5

14 years ago
The socket leaved opened when I close MozillaMail (but also when MozillaMail is
still opened but is unused) cause that the account on the imap server is locked
and CANNOT be accessed from another IMAP client like Eudora, ...
All other client disconnect from the server when they do not need do UL/DL anything.
To free the account I need to close the entire Mozilla.
This is clearly a bad behaviour.
Please fix.

Comment 6

14 years ago
I forgot to write my architecture:
Mozilla 1.7.2
Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7.2) Gecko/20040803

Comment 7

14 years ago
I repeat, if you want to close the connection, just toggle the offline button,
it will close all the connections.

Comment 8

14 years ago
(In reply to comment #7)
> I repeat, if you want to close the connection, just toggle the offline button,
> it will close all the connections.
The problem is that I understand that there was a disconnection from the server
only when I press "Get Msgs" and Mozilla remain stuck trying to connect.
In this situation pressing "Offline" cause only a "ding" but Mozilla continue to
try with the server. Only after 30 secs the error dialog box appear, I press OK,
and then I can press offline. Its very annoing. And also toggle Offline every
time before press GetMsgs is annoying. This is a temporary work around not the fix.
(Reporter)

Comment 9

14 years ago
The problem with the technique in comment #3 and comment #7 is this:

1)  close the Mail window
2)  go offline (IMAP connection closed correctly)
3)  go online and continue surfing
4)  after the "check for mail every X minutes" has passed, IMAP connection is
recreated, unconditionally

If I've closed the Mail window and gone through the toggle-offline dance, I
don't want the connection reopened.

The only alternatives are:  do all browsing in (X-1) minute increments, or
completely exit Mozilla and lose all state (tabs, forward/back history, etc),
neither of which are workable.
Product: MailNews → Core

Comment 10

13 years ago
I found a working and friendly 'work around' (maybe can help fixer to understan
where is the bug):
If I set:
Modify menu, Email Account configuration, server settings, Advanced, IMAP tab,
max number of cache server connection = 1
... the bug never happen.
The default for IMAP cache server connection is 5.
With 2 cache server connection I got also the bug.
So the bug is strictly related to connection cache handling.

Comment 11

13 years ago
Please set it to Hardware: All, OS: All, and set the status to NEW.
The related bug 115349 now is RESOLVED FIXED, but probably need to be REOPEN.

Updated

13 years ago
Blocks: 245258
(Assignee)

Updated

9 years ago
Product: Core → MailNews Core

Updated

9 years ago
QA Contact: grylchan → networking.imap

Updated

9 years ago
Assignee: bienvenu → nobody
You need to log in before you can comment on or make changes to this bug.