]> granicus.if.org Git - libevent/commit
Fix a race condition in the dns/bufferevent_connect_hostname test.
authorNick Mathewson <nickm@torproject.org>
Mon, 9 Jan 2012 21:44:53 +0000 (16:44 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 9 Jan 2012 21:44:53 +0000 (16:44 -0500)
commitcba48c7d46a5442f64be19b7b08aebad5968b64a
tree5df0cb4fbc8c4b99b13810d53284577adc789d96
parentecfc720a4f7666d468413a3b9b29908bff5ddb82
Fix a race condition in the dns/bufferevent_connect_hostname test.

As originally written, the test would only pass if the accept()
callbacks for the evconnlistener were all invoked before the last of
the CONNECTED/ERROR callbacks for the connecting/resolving bufferevent
had its call to event_base_loopexit() complete.  But this was only
accidentally true in 2.0, and might not be true at all in 2.1 where
we schedule event_base_once() callbacks more aggressively.

Found by Sebastian Hahn.
test/regress_dns.c