1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s3:rpc_server: 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 <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2023-01-12 10:49:13 +01:00 committed by Ralph Boehme
parent 7e6f830d9d
commit c5201cd0b5
2 changed files with 4 additions and 0 deletions

View File

@ -967,6 +967,8 @@ static struct tevent_req *rpc_host_bind_read_send(
close(sock_dup);
return tevent_req_post(req, ev);
}
/* as server we want to fail early */
tstream_bsd_fail_readv_first_error(state->plain, true);
if (transport == NCACN_NP) {
subreq = tstream_npa_accept_existing_send(

View File

@ -390,6 +390,8 @@ static void rpc_worker_new_client(
strerror(errno));
goto fail;
}
/* as server we want to fail early */
tstream_bsd_fail_readv_first_error(tstream, true);
}
sock = -1;