Skip to content

Deno.connect() can't be canceled if unreachable hostname and port specified #26819

@kt3k

Description

@kt3k

If unreachable hostname and port pair is specified in Deno.connect, it can't be canceled until it times out with OS Error.

const conn = await Deno.connect({ hostname: "104.20.22.46", port: 50000 });
// This times out with os error 60 in about 75 sec on mac os.

This situation is inconvenient for some of the node.js compat unit test cases (for example, a case in tests/node_compat/test/parallel/test-net-autoselectfamily.js connects to the above server and the above hang happens, which wastes about 1 min before the connection is closed from the server (See #26661))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctlyext/netrelated to ext/net

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions