projects
/
org.ibex.mail.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7bc79e9
)
fixed bug that could cause Outgoing thread to get stuck
author
adam
<adam@megacz.com>
Mon, 13 Mar 2006 08:03:43 +0000
(08:03 +0000)
committer
adam
<adam@megacz.com>
Mon, 13 Mar 2006 08:03:43 +0000
(08:03 +0000)
darcs-hash:
20060313080343
-5007d-
3bd14dd230e83dfe9fd8310359d9f5d9167c61a3
.gz
src/org/ibex/mail/protocol/SMTP.java
patch
|
blob
|
history
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);
}