diff -r 407c428adb5b -r d879bab39600 org/sonews/mlgw/MailPoller.java --- a/org/sonews/mlgw/MailPoller.java Tue Apr 27 21:51:12 2010 +0200 +++ b/org/sonews/mlgw/MailPoller.java Tue Apr 27 22:11:30 2010 +0200 @@ -63,7 +63,7 @@ { Log.get().info("Starting Mailinglist Poller..."); int errors = 0; - while(isRunning() && errors < 5) + while(isRunning()) { try { @@ -127,7 +127,7 @@ // AuthentificationFailedException may be thrown if credentials are // bad or if the Mailbox is in use (locked). ex.printStackTrace(); - errors++; + errors = errors < 5 ? errors + 1 : errors; } catch(InterruptedException ex) { @@ -137,12 +137,12 @@ catch(MessagingException ex) { ex.printStackTrace(); - errors++; + errors = errors < 5 ? errors + 1 : errors; } catch(Exception ex) { ex.printStackTrace(); - errors++; + errors = errors < 5 ? errors + 1 : errors; } } Log.get().severe("MailPoller exited.");