handle accept(null) gracefully
authoradam <adam@megacz.com>
Wed, 21 Jul 2004 21:06:43 +0000 (21:06 +0000)
committeradam <adam@megacz.com>
Wed, 21 Jul 2004 21:06:43 +0000 (21:06 +0000)
darcs-hash:20040721210643-5007d-6d44a8d2db0e1d5917fd094a9d79f15dbdf92580.gz

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

index 0c001ef..23cfb68 100644 (file)
@@ -92,6 +92,7 @@ public class SMTP {
 
         private static final HashSet deadHosts = new HashSet();
         public static void accept(Message m) throws IOException {
+            if (m == null) { Log.warn(Outgoing.class, "attempted to accept(null)"); return; }
             Log.info(SMTP.class, "queued:\n" + m.summary());
             if (m.traces.length >= 100)
                 Log.warn(SMTP.Outgoing.class, "Message with " + m.traces.length + " trace hops; dropping\n" + m.summary());