From 8e8f2fa9c7f1e2cb8a296755a8c0aba6a2d22b54 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 12 Jan 2023 10:44:25 +0100 Subject: [PATCH] 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 --- libcli/named_pipe_auth/npa_tstream.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.47.3