1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4: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:48:22 +01:00 committed by Ralph Boehme
parent 27b2ca7d8d
commit 7e6f830d9d

View File

@ -274,6 +274,8 @@ static void dcesrv_sock_accept(struct stream_connection *srv_conn)
return;
}
socket_set_flags(srv_conn->socket, SOCKET_FLAG_NOCLOSE);
/* as server we want to fail early */
tstream_bsd_fail_readv_first_error(dcesrv_conn->stream, true);
}
dcesrv_conn->local_address = srv_conn->local_address;