ardatan / feTS

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

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

Open thelinuxlich opened 1 month ago

thelinuxlich commented 1 month 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 1 month 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?