From: Stefan Metzmacher Date: Thu, 12 Jan 2023 09:46:56 +0000 (+0100) Subject: s4:service_named_pipe: make use of tstream_bsd_fail_readv_first_error(true) X-Git-Tag: talloc-2.4.2~1180 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27b2ca7d8d725b374aef97c11e0650686cfadbd3;p=thirdparty%2Fsamba.git s4:service_named_pipe: make use of 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/source4/samba/service_named_pipe.c b/source4/samba/service_named_pipe.c index 4b880fd85a3..bf2350c1a60 100644 --- a/source4/samba/service_named_pipe.c +++ b/source4/samba/service_named_pipe.c @@ -66,6 +66,8 @@ static void named_pipe_accept(struct stream_connection *conn) "named_pipe_accept: out of memory"); return; } + /* as server we want to fail early */ + tstream_bsd_fail_readv_first_error(plain_tstream, true); subreq = tstream_npa_accept_existing_send(conn, conn->event.ctx, plain_tstream,