From: Stefan Metzmacher Date: Thu, 12 Jan 2023 09:42:14 +0000 (+0100) Subject: s4:ntp_signd: make use of tstream_bsd_fail_readv_first_error(true) X-Git-Tag: talloc-2.4.2~1184 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=391ef8ae7b2d394e65b8872dcca67984673e7574;p=thirdparty%2Fsamba.git s4:ntp_signd: 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/ntp_signd/ntp_signd.c b/source4/ntp_signd/ntp_signd.c index eab70f1f148..4cf460fd2d9 100644 --- a/source4/ntp_signd/ntp_signd.c +++ b/source4/ntp_signd/ntp_signd.c @@ -479,6 +479,8 @@ static void ntp_signd_accept(struct stream_connection *conn) "ntp_signd_accept: out of memory"); return; } + /* as server we want to fail early */ + tstream_bsd_fail_readv_first_error(ntp_signd_conn->tstream, true); ntp_signd_conn->conn = conn; ntp_signd_conn->ntp_signd = ntp_signd;