projects
/
org.ibex.mail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug that could cause Outgoing thread to get stuck
[org.ibex.mail.git]
/
src
/
org
/
ibex
/
mail
/
protocol
/
SMTP.java
diff --git
a/src/org/ibex/mail/protocol/SMTP.java
b/src/org/ibex/mail/protocol/SMTP.java
index
c3be6a4
..
1ba2090
100644
(file)
--- 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 (!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;
}
} catch (Exception e) {
//if (e instanceof InterruptedException) throw e;
@@
-323,6
+329,7
@@
public class SMTP {
while(true) {
Log.setThreadAnnotation("[outgoing #"+serial+"] ");
wake();
while(true) {
Log.setThreadAnnotation("[outgoing #"+serial+"] ");
wake();
+ Thread.sleep(1000);
synchronized(Outgoing.class) {
Outgoing.class.wait(5 * 60 * 1000);
}
synchronized(Outgoing.class) {
Outgoing.class.wait(5 * 60 * 1000);
}