-
-
Notifications
You must be signed in to change notification settings - Fork 729
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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:
ProxyAgentOptionsextendsAgentOptionsAgentOptionsextendsPoolOptionsPoolOptionsextendsClientOptionsClientOptionsincludesconnectparameter which acceptsConnectOptions
Therefore, the timeout and signal options should work when passed through the connect parameter.
Relevant Documentation Links
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working