From f0d6e61977b68da48524e861646e2ad4bb91a214 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 21 Sep 2009 02:36:06 +0200 Subject: async_sock: return -1/EPIPE if we're getting an end of file on read. This makes the error handling in the callers easier. metze --- lib/async_req/async_sock.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/async_req') diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c index f5a0dfde70..18adb42a0c 100644 --- a/lib/async_req/async_sock.c +++ b/lib/async_req/async_sock.c @@ -160,6 +160,10 @@ static void async_recv_handler(struct tevent_context *ev, /* retry */ return; } + if (state->received == 0) { + tevent_req_error(req, EPIPE); + return; + } if (state->received == -1) { tevent_req_error(req, errno); return; -- cgit