[squid-dev] [PATCH] Do not make bogus recvmsg calls
Amos Jeffries
squid3 at treenet.co.nz
Fri Jun 10 02:09:44 UTC 2016
On 10/06/2016 12:20 p.m., Alex Rousskov wrote:
> Hello,
>
> The attached simple patch prevents bogus recvmsg(2) calls when
> closing file descriptors. Please see the patch preamble for details.
>
> A cleaner way to handle this problem may be to introduce a new
> FD_FLUSH_METHOD() API that would do nothing for UDS (and possibly BIO
> SSL?) sockets. However, a whole new API feels like a too-heavy solution
> for such a small/isolated/hacky purpose. It may be better to spend that
> development cycles on avoiding flushing TCP sockets that already
> returned a zero-size read and do not need to be flushed. Please let me
> know if you disagree (and I will not commit this patch).
>
+1. Looks okay for now.
Its relation to RST implies UDP sockets are also doing useless reads.
IIRC there is a difference between client and server TCP sockets RST
behaviour as well. So this probably needs a full re-analysis to get right.
Amos
More information about the squid-dev
mailing list