}
}
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;
while(true) {
Log.setThreadAnnotation("[outgoing #"+serial+"] ");
wake();
+ Thread.sleep(1000);
synchronized(Outgoing.class) {
Outgoing.class.wait(5 * 60 * 1000);
}