BSD: avoid delay on continued-connection
authorJeremy Harris <jgh146exb@wizmail.org>
Mon, 4 Jan 2021 17:59:23 +0000 (17:59 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Mon, 4 Jan 2021 17:59:23 +0000 (17:59 +0000)
Broken-by: 6454662ecb
src/src/transports/smtp.c

index 8f42871bf177ac5197971deb12f92087325860a6..2a600d4806cffa0226a22af3d655c69797adaa4e 100644 (file)
@@ -4393,10 +4393,13 @@ This change is being made on 31-Jul-98. After over a year of trouble-free
 operation, the old commented-out code was removed on 17-Sep-99. */
 
 SEND_QUIT:
+if (sx->send_quit)
+  {
 #ifdef EXIM_TCP_CORK
-(void) setsockopt(sx->cctx.sock, IPPROTO_TCP, EXIM_TCP_CORK, US &on, sizeof(on));
+  (void) setsockopt(sx->cctx.sock, IPPROTO_TCP, EXIM_TCP_CORK, US &on, sizeof(on));
 #endif
-if (sx->send_quit) (void)smtp_write_command(sx, SCMD_FLUSH, "QUIT\r\n");
+  (void)smtp_write_command(sx, SCMD_FLUSH, "QUIT\r\n");
+  }
 
 END_OFF: