GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ProxyAgent ignores connect timeout options and lacks documentation for signal parameter · Issue #3944 · nodejs/undici

ProxyAgent ignores connect timeout options and lacks documentation for signal parameter #3944

New issue
Copy link
New issue
Copy link
Closed
#3945
Closed
ProxyAgent ignores connect timeout options and lacks documentation for signal parameter#3944
#3945
Copy link
Labels
bugSomething isn't working

Description

@timursevimli
timursevimli
opened on Dec 12, 2024
Issue body actions

Bug Description

The connect options passed to ProxyAgent are being ignored, despite the type definitions suggesting they should work. This appears to be both a potential bug and a documentation issue.

Reproducible By

const { ProxyAgent } = require('undici');

const agent = new ProxyAgent({
  uri: 'http://8.8.8.8:8000',
  connect: {
    signal: AbortSignal.timeout(100),
    timeout: 100,
  },
});

fetch('https://example.com', {
  dispatcher: agent,
})
  .then((res) => res.text())
  .then(console.log)
  .catch(console.error);

Current Behavior

The timeout and signal parameters in connect options are not being processed when passed to ProxyAgent

Expected Behavior

According to the documentation:

  • ProxyAgentOptions extends AgentOptions
  • AgentOptions extends PoolOptions
  • PoolOptions extends ClientOptions
  • ClientOptions includes connect parameter which accepts ConnectOptions

Therefore, the timeout and signal options should work when passed through the connect parameter.

Relevant Documentation Links

  • ConnectOptions Documentation
  • ClientOptions Documentation

Activity

  1. timursevimli
    added
    bugSomething isn't working
    on Dec 12, 2024
  2. mcollina commented on Dec 13, 2024

    @mcollina
    mcollina
    on Dec 13, 2024
    SponsorMember
    More actions

    Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.

  3. timursevimli commented on Dec 13, 2024

    @timursevimli
    timursevimli
    on Dec 13, 2024
    ContributorAuthor
    More actions

    Yes, I will make a pull request

  4. mcollina
    closed this as completedin #3945on Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.