[PATCH] Instruct the kernel to reset the connection for SC_RX_TIMEOUT, and others

Poul-Henning Kamp phk at phk.freebsd.dk
Sun Mar 1 10:05:37 CET 2015


--------
In message <54F0B1FE.3040600 at schokola.de>, Nils Goroll writes:

>Closing TCP connections with SO_LINGER unset [...]

I pressume you mean "set" ?

The problem with !SO_LINGER (we tried it some years back) is that
all queued data is discarded the moment you call close(2), and we
have no way to know if our last response is still lingering in the
kernel's tcp-buffers and dribbling out to a slow client with a bad
mobile phone connection.

The option we need is "Try reasonably to send what you have, then
close, but let userland continue right away."

Architectually it's amazing how different kernel/TCP semantics are
from what HTTP needs...

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-dev mailing list