1100 wasn't the dead code, since the r could be 2 in case of
ECONNREFUSED, and it should trigger errorcb not the writecb.
This is actually questionable should be call errorcb at all in case of
connect() returns an error immediately, but I guess the reason was to
make it compatible with others, ECONNREFUSED can be returned only for
specific cases and only on BSD (AFAIK). While for instance EHOSTUNREACH
is not.
And after this change now all tests are passed on FreeBSD. Well,
sometimes few tests fails due to timing issues, but in general looks
good. Since even all tests in parallel passed:
And having green CI is crucial for libevent, not only because it is
a rule of thumb for all projects, but also because in case of failures
it will retry on and on, which will cause CI stuck.
1100 wasn't the dead code, since the
r
could be2
in case ofECONNREFUSED
, and it should trigger errorcb not the writecb.This is actually questionable should be call errorcb at all in case of connect() returns an error immediately, but I guess the reason was to make it compatible with others, ECONNREFUSED can be returned only for specific cases and only on BSD (AFAIK). While for instance EHOSTUNREACH is not.
And after this change now all tests are passed on FreeBSD. Well, sometimes few tests fails due to timing issues, but in general looks good. Since even all tests in parallel passed:
And having green CI is crucial for libevent, not only because it is a rule of thumb for all projects, but also because in case of failures it will retry on and on, which will cause CI stuck.
Fixes: bufferevent/bufferevent_connect_fail Fixes: bufferevent/bufferevent_connect_fail_eventcb Fixes: bufferevent/bufferevent_connect_fail_eventcb_defer
This reverts commit 56e121310954cbee2310c5eb2a3000115186563d. Refs: https://github.com/libevent/libevent/pull/1100