adjusted timeouts
authoradam <adam@megacz.com>
Wed, 7 Jul 2004 08:53:40 +0000 (08:53 +0000)
committeradam <adam@megacz.com>
Wed, 7 Jul 2004 08:53:40 +0000 (08:53 +0000)
darcs-hash:20040707085340-5007d-77c45f2c8cc1d4e337b9fd3814281c4d9f04b88f.gz

src/org/ibex/mail/protocol/SMTP.java

index ea2363b..f9989ff 100644 (file)
@@ -125,6 +125,7 @@ public class SMTP {
             try {
                 Log.info(SMTP.Outgoing.class, "connecting to " + mx + "...");
                 Connection conn = new Connection(new Socket(mx, 25), InetAddress.getLocalHost().getHostName());
+                conn.setTimeout(60 * 1000);
                 Log.info(SMTP.Outgoing.class, "connected");
                 check(conn.readln());  // banner
                 conn.println("HELO " + conn.vhost);            check(conn.readln());
@@ -156,7 +157,7 @@ public class SMTP {
                         catch (IOException e) { Log.error(SMTP.Outgoing.class, e); }
                     synchronized(Outgoing.class) {
                         Log.info(SMTP.Outgoing.class, "outgoing thread going to sleep");
-                        Outgoing.class.wait(10 * 60 * 1000);
+                        Outgoing.class.wait(5 * 60 * 1000);
                         deadHosts.clear();
                         Log.info(SMTP.Outgoing.class,"outgoing thread woke up; "+spool.count(Query.all())+" messages in queue");
                     }