Ensure server tls close alert not delayed
[exim.git] / src / src / tls-openssl.c
index 5130455fe6698f7abaf5d6926d5979293bb9be65..576f62ba6cd1262c72992cbe84c2bba4d60bb253 100644 (file)
@@ -4516,6 +4516,9 @@ if (do_shutdown)
   if (  (rc = SSL_shutdown(*sslp)) == 0        /* send "close notify" alert */
      && do_shutdown > 1)
     {
+#ifdef EXIM_TCP_CORK
+    (void) setsockopt(*fdp, IPPROTO_TCP, EXIM_TCP_CORK, US &off, sizeof(off));
+#endif
     ALARM(2);
     rc = SSL_shutdown(*sslp);          /* wait for response */
     ALARM_CLR(0);