Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
be: fix with filtered bufferevents and connect() without EAGAIN
With filtered bufferevents (i.e. not real one, that have socket), we can trigger incorrect callback in this case. Let's look at example with http and bufferevent_openssl_filter_new(): - bev = bufferevent_openssl_filter_new() - http layer trying to connect() to localhost with bev # at this time, bev have writecb/readcb NULL but ev_write/ev_read has # timeout with 45 secs, default HTTP connect timeout - and when connect() retruns without EAGAIN (BSD'ism) we called event_active() before (with EV_WRITE), and this will call ev_write timeout only, while it is more correct to act on bufferevent instead of plain event, so let's trigger EV_WRITE for bufferevent which will do the job (and let's do this deferred). Fixes: http/https_simple # under solaris
- Loading branch information