diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2020-05-09 15:04:17 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2020-05-09 15:04:17 +0100 |
commit | 68f71b94cc10f8b0453597d0f92b4bd7d995eeef (patch) | |
tree | 0eb6de10301bed7765b55b4caddf9adf031d82b4 /src | |
parent | 83e8da8c07f783c7d677166940be3fc9b3f7d0ab (diff) |
Performance: workaround Linux kernel bug
Diffstat (limited to 'src')
-rw-r--r-- | src/src/smtp_out.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c index 6f7fb85c1..86c3e4127 100644 --- a/src/src/smtp_out.c +++ b/src/src/smtp_out.c @@ -509,6 +509,16 @@ else 0 #endif ); + +#if defined(__linux__) + /* This is a workaround for a current linux kernel bug: as of + 5.6.8-200.fc31.x86_64 small (<MSS) writes get delayed by about 200ms, + This is despite NODELAY being active. + https://bugzilla.redhat.com/show_bug.cgi?id=1803806 */ + + if (!more) + setsockopt(outblock->cctx->sock, IPPROTO_TCP, TCP_CORK, &off, sizeof(off)); +#endif } } |