summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/async_req/async_sock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c
index 77df406044..39705f45bb 100644
--- a/lib/async_req/async_sock.c
+++ b/lib/async_req/async_sock.c
@@ -547,7 +547,8 @@ static void read_packet_handler(struct tevent_context *ev,
ssize_t nread, more;
uint8_t *tmp;
- nread = read(state->fd, state->buf+state->nread, total-state->nread);
+ nread = recv(state->fd, state->buf+state->nread, total-state->nread,
+ 0);
if (nread == -1) {
tevent_req_error(req, errno);
return;