Skip to content

http2-client fatally fails when connection is refused #71

@lanurmi

Description

@lanurmi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions