-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Report connection timeout as separate event #1171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@gjasny, thanks for the pull request. Could you take a look at the problem on GitHub Actions workflow? |
08e983b
to
d862b44
Compare
d862b44
to
9651238
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could please revert back the changes of moving the following lines in test/test.cc?
ASSERT_TRUE(res);
ASSERT_EQ(200, res->status);
9651238
to
41af41e
Compare
According to the code added in the unit test, does this new error type occur only with AF_INET? If so, it will actually create more confusion for users using AF_UNSPEC, because they won't receive the ConnectionTimeout even if it's declared in httplib.h... cli.set_address_family(AF_INET); |
It took me a while why the test was failing on Linux. What happens is:
By explicitly requesting an IPv4 lookup the test avoids the second IPv6 loop and the overwriting of the error code. If the host would have IPv6 connectivity it would also return "ConnectionTimeout" for IPv6. |
@gjasny, thanks for the clear explanation. I'll merge it to the master branch soon. Thanks for your contribution! |
No description provided.