-
Notifications
You must be signed in to change notification settings - Fork 626
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
ClientBootstrap.connect
that returns a NIOAsyncChannel hits precondition if connect fails
#2637
Comments
Thanks for filing this. We are aware of this problem and @tayloraswift has also reported this in the forums. The problem here is that we tried to model the My current idea here is that we have to create new bootstrap APIs that provide scope access to the |
If
ClientBootstrap.connect
returns aNIOAsyncChannel
and the connect fails after theNIOAsyncChannel
has been created, it will hit a precondition instead of throwing an error.Expected behavior
ClientBootstrap.connect
throws the error that caused the connect to failActual behavior
We hit the precondition
Steps to reproduce
localhost
instead. (I assume this is due to localhost resolving to both IPv4 and IPv6)If possible, minimal yet complete reproducer code (or URL to code)
SwiftNIO version/commit hash
swift-nio 2.63.0
System & version information
swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: x86_64-apple-macosx14.0
The text was updated successfully, but these errors were encountered: