-
Notifications
You must be signed in to change notification settings - Fork 254
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
Comments
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 |
#29 DNS related failures should end up in on_open with error |
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) { Or more detailed: if (reason & (ERROR | TLS)) |
This is fixed by having a new event only for client connection errors |
Allegedly there's a bug where on_open is called followed by on_close when connect failes. Needs to be checked.
The text was updated successfully, but these errors were encountered: