Noel,

This problem is one of a few I fixed in my originally submitted v3 reworked
version of fetchmail. In
org.apache.james.fetchmail.FolderProcessor.process() the open() call is
enclosed in a try block for which there is a finally clause that always
invokes close() on the folder.

I'm midway through testing the promised v2.2 version that derives and
improves on this, but this part has not been changed. If you are seeing a
condition in my reworked v3 version where the finally clause would not be
executed please let me know so I can fix it prior to submission (next few
days).

-- Steve

Disclaimer: This is an early a.m. answer due to jet lag. Worse, I'm supposed
to be off (sail) racing in 5 hours time!

> -----Original Message-----
> From: Noel J. Bergman [mailto:[EMAIL PROTECTED]
> Sent: 16 August 2003 20:05
> To: James Users List
> Subject: RE: POP3Fetcher leaving open connections?
>
>
> Danny,
>
> You implemented a fix last October (FetchPOP.java v1.5), but
> that has been
> in all released versions of James v2.1.x.  Brian indicates that he is
> running v2.1.3, and there have not been any updates since then.
>
> Looking over the current code, there is a try {} around the entire
> transaction, and a try {} inside the for-loop.  However, the
> latter isn't
> the entire block.  The pop.retrieveMessage() call isn't
> protected, so any
> exception occuring during that operation would cause the
> process to exit to
> the outer try {}, which would terminate the task.
>
> It seems to me that the try {} should be expanded to include the few
> statements not already in it, and later in the code, pop.logout and
> pop.disconnect should be moved to a finally {}.
>
> Steve Brewin, since he's currently working in Fetchmail,
> should also review
> that code.  It appears at first glance to have the same
> problem, although
> expressed differently.  There is no protection at all for an
> exception in
> the message processing loop, nor anything to ensure that
> folder.close() is
> called.
>
> If neither one of you wants to get to it, I'll do it later.
>
>       --- Noel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to