Skip to content
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

us_socket_context_connect error reporting #25

Closed
ghost opened this issue Dec 26, 2018 · 4 comments
Closed

us_socket_context_connect error reporting #25

ghost opened this issue Dec 26, 2018 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 26, 2018

Allegedly there's a bug where on_open is called followed by on_close when connect failes. Needs to be checked.

@ghost ghost added the bug label Dec 26, 2018
@ghost ghost mentioned this issue Aug 4, 2019
@ghost
Copy link
Author

ghost commented Aug 18, 2019

is_client should be changed to OUTBOUND, INBOUND, OUTBOUND_ERROR, (INBOUND_ERROR)

or similar to tell a better story about the opening cause, where OUTBOUND_ERROR would be connection error.

Maybe even a whole struct? It makes sense to have at least 3 different connection errors: DNS, TLS, SYSTEM.

Inspiration from Apple's Network.framework

@ghost ghost added enhancement and removed bug labels Aug 18, 2019
@ghost
Copy link
Author

ghost commented Aug 18, 2019

#29 DNS related failures should end up in on_open with error

@ghost ghost added the 0.4.0 label Aug 18, 2019
@ghost
Copy link
Author

ghost commented Aug 18, 2019

It could be a bitfield like so:

OUTBOUND | ERROR | TLS -> this would be a connection error of TLS kind

Then you can easily check for what you are interested in:

if (reason & ERROR) {
// oopsie here
}

Or more detailed:

if (reason & (ERROR | TLS))

@ghost
Copy link
Author

ghost commented Feb 14, 2021

This is fixed by having a new event only for client connection errors

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants