Skip to content

QuicConnection.ConnectAsync raises SocketException when host not found #78751

@bentoi

Description

@bentoi

Description

The QuicConnect.ConnectAsync method raises a SocketException(SocketErrorCode = HostNotFound) if the resolution of a DnsEndPoint set with QuicClientOptions.RemoteEndpoint fails. I did expect a QuicException with a suitable error code instead.

Reproduction Steps

await using var connection = await QuicConnection.ConnectAsync(new QuicClientConnectionOptions
    {
          RemoteEndPoint = new DnsEndPoint("bogus.foo.com", 5001);
          ClientAuthenticationOptions = new SslClientAuthenticationOptions { ... } 
    });

Expected behavior

A QuicException with suitable QuicError.

Actual behavior

It raises a SocketException.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

area-System.Net.QuicdocumentationDocumentation bug or enhancement, does not impact product or test code

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions