Debug: show stalled send-data count on message-errors
[exim.git] / src / src / transports / smtp.c
index a31982223452e21d68568ae336ac5203a2f73483..9e337e93f8d65bc22042f6e639a418896750c607 100644 (file)
@@ -4134,6 +4134,13 @@ if (!sx->ok)
 
         *message_defer = TRUE;
         }
+
+      DEBUG(D_transport) if (sx->cctx.sock >= 0)
+       {
+       int n;
+       if (ioctl(sx->cctx.sock, TIOCOUTQ, &n) == 0)
+         debug_printf("%d bytes remain in socket output buffer\n", n);
+       }
       }
 
     /* Otherwise, we have an I/O error or a timeout other than after MAIL or