forked from I2P_Developers/i2p.i2p
SusiMail: Fix dup ConnectWaiter run, no failure message
This commit is contained in:
@@ -896,7 +896,6 @@ public class WebMail extends HttpServlet
|
|||||||
boolean found = false;
|
boolean found = false;
|
||||||
Log log = _so.log;
|
Log log = _so.log;
|
||||||
if (connected) {
|
if (connected) {
|
||||||
if (log.shouldDebug()) log.debug("CONNECTED, YAY");
|
|
||||||
// we do this whether new mail was found or not,
|
// we do this whether new mail was found or not,
|
||||||
// because we may already have UIDLs in the MailCache to fetch
|
// because we may already have UIDLs in the MailCache to fetch
|
||||||
synchronized(_so) {
|
synchronized(_so) {
|
||||||
@@ -916,9 +915,8 @@ public class WebMail extends HttpServlet
|
|||||||
if (mc != null) {
|
if (mc != null) {
|
||||||
found = mc.getMail(MailCache.FetchMode.HEADER);
|
found = mc.getMail(MailCache.FetchMode.HEADER);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (log.shouldDebug()) log.debug("NOT CONNECTED, BOO");
|
|
||||||
}
|
}
|
||||||
|
if (log.shouldDebug()) log.debug("CW.FNM connected? " + connected + " found? " + found);
|
||||||
synchronized(_so) {
|
synchronized(_so) {
|
||||||
if (!connected) {
|
if (!connected) {
|
||||||
String error = _mb.lastError();
|
String error = _mb.lastError();
|
||||||
@@ -1378,10 +1376,7 @@ public class WebMail extends HttpServlet
|
|||||||
sessionObject.isFetching = true;
|
sessionObject.isFetching = true;
|
||||||
ConnectWaiter cw = new ConnectWaiter(sessionObject);
|
ConnectWaiter cw = new ConnectWaiter(sessionObject);
|
||||||
if (mailbox.connectToServer(cw)) {
|
if (mailbox.connectToServer(cw)) {
|
||||||
// Start a thread to wait for results
|
// mailbox will callback to cw
|
||||||
if (log.shouldDebug()) log.debug("Already connected, running CW");
|
|
||||||
Thread t = new I2PAppThread(cw, "Email fetcher");
|
|
||||||
t.start();
|
|
||||||
} else {
|
} else {
|
||||||
sessionObject.error += _t("Cannot connect") + '\n';
|
sessionObject.error += _t("Cannot connect") + '\n';
|
||||||
sessionObject.isFetching = false;
|
sessionObject.isFetching = false;
|
||||||
|
Reference in New Issue
Block a user