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

http2-client fatally fails when connection is refused #71

Open
lanurmi opened this issue Sep 8, 2021 · 2 comments
Open

http2-client fatally fails when connection is refused #71

lanurmi opened this issue Sep 8, 2021 · 2 comments
Labels
good first issue Good for newcomers

Comments

@lanurmi
Copy link

lanurmi commented Sep 8, 2021

Expected behavior

Error about connection being refused, no fatal error.

Actual behavior

ERROR: NIOConnectionError(host: "localhost", port: 443, dnsAError: nil, dnsAAAAError: nil, connectionErrors: [NIO.SingleConnectionFailure(target: [IPv6]localhost/::1:443, error: connection reset (error set): Connection refused (errno: 61)), NIO.SingleConnectionFailure(target: [IPv4]localhost/127.0.0.1:443, error: connection reset (error set): Connection refused (errno: 61))])
Fatal error: leaking promise created at (file: "/Users/lauri/Documents/swift-nio-examples/http2-client/Sources/http2-client/main.swift", line: 298): file /Users/lauri/Documents/swift-nio-examples/http2-client/Sources/http2-client/main.swift, line 298
zsh: illegal hardware instruction  swift run http2-client https://localhost/

Steps to reproduce

  1. Do not have any server running at localhost:443
  2. Run swift run http2-client https://localhost/

If possible, minimal yet complete reproducer code (or URL to code)

[anything to help us reproducing the issue]

version/commit hashes from all involved dependencies

61a502f

Swift & OS version (output of swift --version && uname -a)

Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
Target: x86_64-apple-darwin19.6.0
Darwin MiniII.lan 19.6.0 Darwin Kernel Version 19.6.0: Tue Jun 22 19:49:55 PDT 2021; root:xnu-6153.141.35~1/RELEASE_X86_64 x86_64

@Lukasa Lukasa added good first issue Good for newcomers help wanted labels Sep 8, 2021
@Lukasa
Copy link
Contributor

Lukasa commented Sep 8, 2021

Yup, a promise isn't being cleaned up in this example.

@natikgadzhi
Copy link

Hm, I don't see a change in the example code itself, but it looks like it works now?

swift-nio-examples/http2-client 
❯ .build/debug/http2-client https://localhost:8000/
ERROR: NIOConnectionError(host: "localhost", port: 8000, dnsAError: nil, dnsAAAAError: nil, connectionErrors: [NIOPosix.SingleConnectionFailure(target: [IPv6]localhost/::1:8000, error: connection reset (error set): Connection refused (errno: 61)), NIOPosix.SingleConnectionFailure(target: [IPv4]localhost/127.0.0.1:8000, error: connection reset (error set): Connection refused (errno: 61))])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants