From ebfd8a89678f1d13f3811561cf3f5cd1ffbfa7f7 Mon Sep 17 00:00:00 2001 From: maksqwe Date: Wed, 4 Sep 2013 14:25:11 +0300 Subject: [PATCH] Fix reinit of fds with EV_WRITE but not EV_READ. Bugfix on 2.1.1-alpha. --- evmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evmap.c b/evmap.c index 1e2f8b55..13305feb 100644 --- a/evmap.c +++ b/evmap.c @@ -582,7 +582,7 @@ evmap_io_reinit_iter_fn(struct event_base *base, evutil_socket_t fd, extra = ((char*)ctx) + sizeof(struct evmap_io); if (ctx->nread) events |= EV_READ; - if (ctx->nread) + if (ctx->nwrite) events |= EV_WRITE; if (evsel->fdinfo_len) memset(extra, 0, evsel->fdinfo_len); -- 2.40.0