Only err on readability if writev_send was explicitly asked to do so
[samba.git] / lib / async_req / async_sock.c
index d88edb177a6b8c37022fe184b8bdeb9f1f221f6b..a505fcf465679b3326d5567c55a22c9de5af0df4 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;
        }