Testsuite: make debug output for proxied TLS less indeterminate
[exim.git] / src / src / transports / smtp.c
index 461b26c4a2b3817692bad84a99ec088b9520a731..016f9783ff82cf7395f973ca76b41c07762ab2a4 100644 (file)
@@ -2511,7 +2511,10 @@ for (addr = sx->first_addr, address_count = 0;
   uschar * rcpt_addr;
 
   if (tcp_out_fastopen && !tcp_out_fastopen_logged)
-    setflag(addr, af_tcp_fastopen);
+    {
+    setflag(addr, af_tcp_fastopen_conn);
+    if (tcp_out_fastopen > 1) setflag(addr, af_tcp_fastopen);
+    }
 
   addr->dsn_aware = sx->peer_offered & OPTION_DSN
     ? dsn_support_yes : dsn_support_no;
@@ -3507,10 +3510,11 @@ propagate it from the initial
            if ((pid = fork()))
              {
              DEBUG(D_transport) debug_printf("proxy-prox final-pid %d\n", pid);
-             _exit(pid ? EXIT_FAILURE : EXIT_SUCCESS);
+             _exit(pid < 0 ? EXIT_FAILURE : EXIT_SUCCESS);
              }
            smtp_proxy_tls(sx.buffer, sizeof(sx.buffer), pfd[0], sx.ob->command_timeout);
-           exim_exit(0);
+           if (running_in_test_harness) millisleep(100);       /* let logging complete */
+           exim_exit(0, US"TLS proxy");
            }
          }
 #endif