ardatan / feTS

🗹 TypeScript HTTP Framework focusing on e2e type-safety, easy setup, performance & great developer experience
https://the-guild.dev/openapi/fets
MIT License
644 stars 29 forks source link

The fetch used in this library is prone to "socket hang up" #1787

Open thelinuxlich opened 3 months ago

thelinuxlich commented 3 months ago

A problem already solved on the native Node.js fetch appears in this lib: if you send multiple requests simultaneously, you're prone to receive the error "socket hang up", probably because the HTTP agent doesn't have the "keepalive" flag enabled.

ardatan commented 3 months ago

We use "node:http" and its global agent in our fetch implementation unless the user provides a custom one. Also if I remember correctly, "keepalive" is enabled by default in newer Node versions. Is it possible for you to help us reproducing it?