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

s4:ldap_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:39:48 +01:00 committed by Ralph Boehme
parent 3a47a276fd
commit e897ccd9c8

View File

@ -338,6 +338,8 @@ static void ldapsrv_accept(struct stream_connection *c,
return;
}
socket_set_flags(c->socket, SOCKET_FLAG_NOCLOSE);
/* as server we want to fail early */
tstream_bsd_fail_readv_first_error(conn->sockets.raw, true);
conn->connection = c;
conn->service = ldapsrv_service;