summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/async_req/async_sock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c
index 545d21378f..9909bc6eb3 100644
--- a/lib/async_req/async_sock.c
+++ b/lib/async_req/async_sock.c
@@ -596,6 +596,10 @@ static void read_packet_handler(struct tevent_context *ev,
nread = recv(state->fd, state->buf+state->nread, total-state->nread,
0);
+ if ((nread == -1) && (errno == ENOTSOCK)) {
+ nread = read(state->fd, state->buf+state->nread,
+ total-state->nread);
+ }
if ((nread == -1) && (errno == EINTR)) {
/* retry */
return;