X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fmail%2Fprotocol%2FSMTP.java;h=1ba209073a185362f91aaf6009e21eaad2c44fbe;hb=a8dfe1ff2aa8f996a21890e71cd9bc87289b59db;hp=c3be6a40a2c5805746836b8b75c5dc11bf8befcb;hpb=35642b81d9211c8d386380846fcb69c0bf700d98;p=org.ibex.mail.git diff --git a/src/org/ibex/mail/protocol/SMTP.java b/src/org/ibex/mail/protocol/SMTP.java index c3be6a4..1ba2090 100644 --- a/src/org/ibex/mail/protocol/SMTP.java +++ b/src/org/ibex/mail/protocol/SMTP.java @@ -308,7 +308,13 @@ public class SMTP { } } if (!good) break; - if (attempt(it.cur())) it.delete(); + try { + if (attempt(it.cur())) it.delete(); + } catch (Exception e) { + Log.error(SMTP.Outgoing.class, e); + } + Log.info(this, "sleeping for 3s..."); + Thread.sleep(3000); } } catch (Exception e) { //if (e instanceof InterruptedException) throw e; @@ -323,6 +329,7 @@ public class SMTP { while(true) { Log.setThreadAnnotation("[outgoing #"+serial+"] "); wake(); + Thread.sleep(1000); synchronized(Outgoing.class) { Outgoing.class.wait(5 * 60 * 1000); }