Fix logging of drop-after-EHLO-reject.
[exim.git] / src / src / smtp_out.c
index cd3906fc0c439dcb8d4ab058543ebe4e6c315b3f..0b5e796d904e95c281f744f774d35b63d7d5149d 100644 (file)
@@ -498,8 +498,12 @@ for (;;)
 
   /* Need to read a new input packet. */
 
-  rc = ip_recv(sock, inblock->buffer, inblock->buffersize, timeout);
-  if (rc <= 0) break;
+  if((rc = ip_recv(sock, inblock->buffer, inblock->buffersize, timeout)) <= 0)
+    {
+    if (!errno)
+      DEBUG(D_deliver|D_transport|D_acl) debug_printf("  SMTP(closed)<<\n");
+    break;
+    }
 
   /* Another block of data has been successfully read. Set up the pointers
   and let the loop continue. */