bev_async: do not initialize timeouts multiple times

You cannot event_assign() event multiple times, this is UB, and most
likely will fail.

Fixes: af9b2a7ae0be11c79a909d212b1833a9379e4ba0 ("Initialize async
bufferevent timeout CBs unconditionally")
This commit is contained in:
Azat Khuzhin 2018-11-13 11:47:14 +03:00
parent e73875dfe2
commit 2bf673a467
No known key found for this signature in database
GPG Key ID: B86086848EF8686D

View File

@ -589,7 +589,6 @@ bufferevent_async_set_connected_(struct bufferevent *bev)
{ {
struct bufferevent_async *bev_async = upcast(bev); struct bufferevent_async *bev_async = upcast(bev);
bev_async->ok = 1; bev_async->ok = 1;
bufferevent_init_generic_timeout_cbs_(bev);
/* Now's a good time to consider reading/writing */ /* Now's a good time to consider reading/writing */
be_async_enable(bev, bev->enabled); be_async_enable(bev, bev->enabled);
} }