Disable IOCP and retry event_base_new_with_config once on failure

This is a fancier bug4457 workaround for 0.2.3.  In 0.2.2, we could
just tell Libevent "Don't enable locking!" so it wouldn't try to make
the event_base notifiable.  But for IOCP, we need a notifiable base.
(Eventually, we'll want a notifiable base for other stuff, like
multithreaded crypto.)  So the solution is to try a full-featured
initialization, and then retry with all the options turned off if that
fails.
This commit is contained in:
Nick Mathewson
2011-11-14 18:12:29 -05:00
parent cf8117136c
commit 7be50c26e8
2 changed files with 42 additions and 1 deletions
+6
View File
@@ -0,0 +1,6 @@
o Minor features:
- When we fail to initialize Libevent, retry with IOCP disabled so we
don't need to turn on multi-threading support in Libevent, which in
turn requires a working socketpair(). This is a workaround for bug
4457, which affects Libevent versions from 2.0.1-alpha through
2.0.15-stable.