Don't decrement virutal event count twice in connect_complete.

This commit is contained in:
Christopher Davis 2010-09-08 20:33:21 -07:00
parent 3ec65d6984
commit 71b6801421
2 changed files with 1 additions and 1 deletions

View File

@ -405,7 +405,6 @@ connect_complete(struct event_overlapped *eo, ev_uintptr_t key,
EVUTIL_ASSERT(bev_a->bev.connecting); EVUTIL_ASSERT(bev_a->bev.connecting);
bev_a->bev.connecting = 0; bev_a->bev.connecting = 0;
event_base_del_virtual(bev->ev_base);
if (ok) if (ok)
bufferevent_async_set_connected(bev); bufferevent_async_set_connected(bev);

View File

@ -2767,6 +2767,7 @@ void
event_base_del_virtual(struct event_base *base) event_base_del_virtual(struct event_base *base)
{ {
EVBASE_ACQUIRE_LOCK(base, th_base_lock); EVBASE_ACQUIRE_LOCK(base, th_base_lock);
EVUTIL_ASSERT(base->virtual_event_count > 0);
base->virtual_event_count--; base->virtual_event_count--;
EVBASE_RELEASE_LOCK(base, th_base_lock); EVBASE_RELEASE_LOCK(base, th_base_lock);
} }