Comments (6)
I can take care of this issue if it's appropriate
from undici.
Sure I can look at adding this patch + some test coverage, It'll likely be outside of my working hours so may be a week or so
from undici.
I opened a pr thank you very much for your support and explanations I hope I did it right if you have any suggestions please do not hesitate @metcoder95 @jackschu
from undici.
Yeah, that's a good catch and indeed a bug. Both belong to a single stream that is most likely tight to a single request/response lifecycle for fetch
and undici
itself.
There's no reason to reuse the same, it was most likely left over we forgot to check.
Would you like to send a PR? It might be hard, but let's see if we can add some tests.
from undici.
I took a swing at this but am running into some trouble around ClientDestroyedError
Currently something like this would result in the promise hanging, I don't think that's correct, and should instead result in a reject
client.on('connect', () => {
client.close()
})
await client.request({
path: '/',
method: 'GET',
})
but just calling errorRequest
on error in client.js
's stream error handler results in a ClientDestroyedError
seemingly if the client is closed without the body having been consumed eg the following will throw
await client.request({
path: '/',
method: 'GET',
})
await client.close()
Any advice around how to handle this?
from undici.
Can you provide the full
Minimum Reproducible Example?
Feel free to also open a PR and we can iterate from it
from undici.
Related Issues (20)
- Missing v6.6.2 tag/release in github HOT 1
- Semver Major Considerations HOT 20
- Let's add superagent to the benchmark table.
- Move to monorepo HOT 34
- Sending a FormData body and manually providing a content-type header HOT 4
- Missing type updates in `undici.request` HOT 2
- `fetch` support for HTTP/2 by default HOT 12
- fetch: Enable fetch via file URL (under flag) HOT 11
- fetch: caching HOT 15
- CodeCov has wrong base?! HOT 3
- expose MessageEvent for node core HOT 2
- next branch purged of semver-major changes? HOT 4
- fetch fail: cause: AggregateError [ETIMEDOUT]: HOT 3
- Unit tests should run even without internet connection HOT 1
- Vulnerability CVE-2024-24750 on 5.X version HOT 1
- Using the MockAgent and the pipeline method
- Run wpt tests concurrently HOT 3
- Unable to run the HTTP/2 benchmarks HOT 2
- Provide an alternative to interceptors HOT 4
- Metro error: Unable to resolve module stream/web HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from undici.