From: Stefan Metzmacher Date: Thu, 12 Jan 2023 09:44:25 +0000 (+0100) Subject: libcli/named_pipe_auth: let tstream_npa_existing_socket use tstream_bsd_fail_readv_fi... X-Git-Tag: talloc-2.4.2~1181 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e8f2fa9c7f1e2cb8a296755a8c0aba6a2d22b54;p=thirdparty%2Fsamba.git libcli/named_pipe_auth: let tstream_npa_existing_socket use tstream_bsd_fail_readv_first_error(true) This avoids doing useless work in case the client connection is already broken. Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme Reviewed-by: Andrew Bartlett --- diff --git a/libcli/named_pipe_auth/npa_tstream.c b/libcli/named_pipe_auth/npa_tstream.c index 07f9cf91d73..a72519e5da2 100644 --- a/libcli/named_pipe_auth/npa_tstream.c +++ b/libcli/named_pipe_auth/npa_tstream.c @@ -1008,6 +1008,8 @@ int _tstream_npa_existing_socket(TALLOC_CTX *mem_ctx, if (ret == -1) { return -1; } + /* as server we want to fail early */ + tstream_bsd_fail_readv_first_error(transport, true); return _tstream_npa_existing_stream( mem_ctx, &transport, file_type, _stream, location); }