]> granicus.if.org Git - libevent/commit
Workaround libevent bug
authorTomash Brechko <tomash.brechko@gmail.com>
Thu, 24 Feb 2011 09:30:40 +0000 (12:30 +0300)
committerNick Mathewson <nickm@torproject.org>
Tue, 8 Mar 2011 02:41:45 +0000 (21:41 -0500)
commit5dc566284d736cb692f88685a3bcec70595a7689
tree9a1582f781097105df2ca07f4870109c59aac7fc
parentab008c7d0588887e88dffd35986005150e5a53e6
Workaround libevent bug
https://sourceforge.net/tracker/index.php?func=detail&aid=3078187&group_id=50884&atid=461324

The problem is that bufferevent_disable() doesn't disable EV_WRITE
when 'connecting' flag is set.  However from evhttp_connection_reset()
we want to disable EV_WRITE for sure (we are closing the socket next).
So we add bufferevent_disable_hard(), which acts like
bufferevent_disable(), but resets 'connecting' flag before the call to
the actual handler.

TODO: bufferevent_disable_hard() shouldn't be public, remove it from
event2/bufferevent.h.
bufferevent.c
http.c
include/event2/bufferevent.h