summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/socket/socket_ipv4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/lib/socket/socket_ipv4.c b/source4/lib/socket/socket_ipv4.c
index 151c49518f..67f1e99d17 100644
--- a/source4/lib/socket/socket_ipv4.c
+++ b/source4/lib/socket/socket_ipv4.c
@@ -204,6 +204,10 @@ static NTSTATUS ipv4_tcp_recv(struct socket_context *sock, TALLOC_CTX *mem_ctx,
flgs |= MSG_DONTWAIT;
}
+ if (flags & SOCKET_FLAG_BLOCK) {
+ flgs |= MSG_WAITALL;
+ }
+
gotlen = recv(sock->fd, buf, wantlen, flgs);
if (gotlen == 0) {
talloc_free(buf);