Skip to content

Commit

Permalink
Initialize async bufferevent timeout CBs unconditionally
Browse files Browse the repository at this point in the history
This is a fix for bug libevent#93 on nmathewson/Libevent.
  • Loading branch information
nmathewson committed Mar 12, 2014
1 parent 462e6b6 commit af9b2a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bufferevent_async.c
Expand Up @@ -564,9 +564,9 @@ bufferevent_async_new_(struct event_base *base,
event_overlapped_init_(&bev_a->read_overlapped, read_complete);
event_overlapped_init_(&bev_a->write_overlapped, write_complete);

bufferevent_init_generic_timeout_cbs_(bev);

bev_a->ok = fd >= 0;
if (bev_a->ok)
bufferevent_init_generic_timeout_cbs_(bev);

return bev;
err:
Expand Down

0 comments on commit af9b2a7

Please sign in to comment.