1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

s4:libcli/wrepl: make use of tstream_bsd_fail_readv_first_error(false)

As a client we want recv pending responses even if the server
already closed the connection.

While tstream_bsd_fail_readv_first_error(false) is the default for
tstream_bsd, the wins replication protocol is special as it has
a way to switch server and client roles on an existing tcp connection.

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:43:21 +01:00 committed by Ralph Boehme
parent 391ef8ae7b
commit 0e83b56403

View File

@ -108,6 +108,8 @@ NTSTATUS wrepl_socket_donate_stream(struct wrepl_socket *wrepl_socket,
}
wrepl_socket->stream = talloc_move(wrepl_socket, stream);
/* as client we want to drain the recv queue on error */
tstream_bsd_fail_readv_first_error(wrepl_socket->stream, false);
return NT_STATUS_OK;
}