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:
parent
7e6f830d9d
commit
c5201cd0b5
source3/rpc_server
@ -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(
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user