Fix reinit of fds with EV_WRITE but not EV_READ.

Bugfix on 2.1.1-alpha.
This commit is contained in:
maksqwe 2013-09-04 14:25:11 +03:00 committed by Nick Mathewson
parent 911abf3dd2
commit ebfd8a8967

View File

@ -582,7 +582,7 @@ evmap_io_reinit_iter_fn(struct event_base *base, evutil_socket_t fd,
extra = ((char*)ctx) + sizeof(struct evmap_io); extra = ((char*)ctx) + sizeof(struct evmap_io);
if (ctx->nread) if (ctx->nread)
events |= EV_READ; events |= EV_READ;
if (ctx->nread) if (ctx->nwrite)
events |= EV_WRITE; events |= EV_WRITE;
if (evsel->fdinfo_len) if (evsel->fdinfo_len)
memset(extra, 0, evsel->fdinfo_len); memset(extra, 0, evsel->fdinfo_len);