Only err on readability if writev_send was explicitly asked to do so
authorVolker Lendecke <vl@samba.org>
Thu, 4 Jun 2009 10:02:38 +0000 (12:02 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 4 Jun 2009 10:05:00 +0000 (12:05 +0200)
A socket might be readable for other reasons

lib/async_req/async_sock.c

index d88edb1..a505fcf 100644 (file)
@@ -425,7 +425,7 @@ static void writev_handler(struct tevent_context *ev, struct tevent_fd *fde,
 
        to_write = 0;
 
-       if (flags & TEVENT_FD_READ) {
+       if ((state->flags & TEVENT_FD_READ) && (flags & TEVENT_FD_READ)) {
                tevent_req_error(req, EPIPE);
                return;
        }