diff --git a/pom.xml b/pom.xml index 4633c5e..69c974c 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.example Widerhall - 0.2.26 + 0.2.27 diff --git a/src/main/java/de/srsoftware/widerhall/data/MailingList.java b/src/main/java/de/srsoftware/widerhall/data/MailingList.java index ada0285..5d3fcd0 100644 --- a/src/main/java/de/srsoftware/widerhall/data/MailingList.java +++ b/src/main/java/de/srsoftware/widerhall/data/MailingList.java @@ -93,6 +93,15 @@ public class MailingList implements MessageHandler, ProblemListener { return setFlag(STATE_PUBLIC_ARCHIVE,enabled); } + @Override + public void clearProblems() { + try { + setLastError(null); + } catch (SQLException e) { + LOG.warn("setLastError(null) failed."); + } + } + /** * create a new ML object int the database * @param email diff --git a/src/main/java/de/srsoftware/widerhall/mail/ImapClient.java b/src/main/java/de/srsoftware/widerhall/mail/ImapClient.java index 2629ca6..59e0383 100644 --- a/src/main/java/de/srsoftware/widerhall/mail/ImapClient.java +++ b/src/main/java/de/srsoftware/widerhall/mail/ImapClient.java @@ -65,6 +65,7 @@ public class ImapClient { while (!stopped){ handleMessages(); + problemListener.clearProblems(); LOG.debug("Idling."); inbox.idle(true); } diff --git a/src/main/java/de/srsoftware/widerhall/mail/ProblemListener.java b/src/main/java/de/srsoftware/widerhall/mail/ProblemListener.java index b22d747..bf7d260 100644 --- a/src/main/java/de/srsoftware/widerhall/mail/ProblemListener.java +++ b/src/main/java/de/srsoftware/widerhall/mail/ProblemListener.java @@ -4,4 +4,6 @@ import javax.mail.MessagingException; public interface ProblemListener { public void onImapException(MessagingException e); + + public void clearProblems(); }