mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Don't decrement virutal event count twice in connect_complete.
This commit is contained in:
parent
3ec65d6984
commit
71b6801421
@ -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);
|
||||||
|
1
event.c
1
event.c
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user