diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2021-11-13 16:12:09 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2021-11-13 16:12:09 +0000 |
commit | 085111b72e3e3524485194b7dd501a9093a1b92f (patch) | |
tree | 8ff5efc625907bcf5d27941c241effaef06a1810 | |
parent | 158b02e0e2e6c4693bdbba50009a329be3a05f77 (diff) |
TFO: avoid needless calls in transport-detection
-rw-r--r-- | src/src/smtp_out.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c index 46713d4b7..9547c4b81 100644 --- a/src/src/smtp_out.c +++ b/src/src/smtp_out.c @@ -150,9 +150,16 @@ return TRUE; #ifdef TCP_FASTOPEN +/* Try to record if TFO was attmepted and if it was successfully used. */ + static void tfo_out_check(int sock) { +static BOOL done_once = FALSE; + +if (done_once) return; +done_once = TRUE; + # ifdef __FreeBSD__ struct tcp_info tinfo; socklen_t len = sizeof(tinfo); @@ -856,7 +863,7 @@ for (;;) } #ifdef TCP_FASTOPEN - tfo_out_check(sx->cctx.sock); +tfo_out_check(sx->cctx.sock); #endif /* Return a value that depends on the SMTP return code. On some systems a |