Okay, it looks like FetchMail has a check for this that goes like:
// if we are already fetching then just return if (fetching) return; fetching = true;
...
fetching = false;
May I suggest though the more robust scheme:
try {
// if we are already fetching then just return
if (fetching) return;
fetching = true;
... } finally { fetching = false; }
This will ensure that fetching is set to false, even if some runtime exception is thrown, and thereby ensuring that FetchMail is actually fetching after that.
I read from the response mails to my original post, that because FetchPop is being deprecated, the patches for that are not wanted, okay. I just keep my local patched version until a time where I can make the switch to FetchMail then.
--S�ren
I don't know what version you are looking at but in 2.2.0a10 it looks like:
// if we are already fetching then just return
if (isFetching())
return; // Enter Fetching State
try
{
setFetching(true);...
finally
{
// Ensure the dynamic accounts are thrown away
resetDynamicAccounts(); getLogger().info(
getConfiguration().getFetchTaskName()
+ " fetcher completed fetches"); // Exit Fetching State
setFetching(false);
}So it's a little more robust than you first listing, but could actually be more robust.
Steen
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
