org/sonews/mlgw/MailPoller.java
changeset 32 3af4237e4a15
parent 16 5a4a41cfc0a3
     1.1 --- a/org/sonews/mlgw/MailPoller.java	Thu Aug 20 21:31:03 2009 +0200
     1.2 +++ b/org/sonews/mlgw/MailPoller.java	Wed Jun 30 14:48:53 2010 +0200
     1.3 @@ -63,7 +63,7 @@
     1.4    {
     1.5      Log.get().info("Starting Mailinglist Poller...");
     1.6      int errors = 0;
     1.7 -    while(isRunning() && errors < 5)
     1.8 +    while(isRunning())
     1.9      {
    1.10        try
    1.11        {
    1.12 @@ -127,7 +127,7 @@
    1.13          // AuthentificationFailedException may be thrown if credentials are
    1.14          // bad or if the Mailbox is in use (locked).
    1.15          ex.printStackTrace();
    1.16 -        errors++;
    1.17 +        errors = errors < 5 ? errors + 1 : errors;
    1.18        }
    1.19        catch(InterruptedException ex)
    1.20        {
    1.21 @@ -137,12 +137,12 @@
    1.22        catch(MessagingException ex)
    1.23        {
    1.24          ex.printStackTrace();
    1.25 -        errors++;
    1.26 +        errors = errors < 5 ? errors + 1 : errors;
    1.27        }
    1.28        catch(Exception ex)
    1.29        {
    1.30          ex.printStackTrace();
    1.31 -        errors++;
    1.32 +        errors = errors < 5 ? errors + 1 : errors;
    1.33        }
    1.34      }
    1.35      Log.get().severe("MailPoller exited.");