Timeout breaking change
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 880
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 68
Description
The bug was introduced in v6.20, the timeout that is set less than a second is ignored, Its a breaking change in minor version
server
const Fastify = require('fastify')
const fastify = Fastify()
fastify.all('*', async (req, reply) => {
await new Promise((resolve) => setTimeout(resolve, 500))
return reply.status(200).send(req.url)
});
fastify.listen({ port: 3000 })
client
const undici = require('undici')
undici.request('http://localhost:3000', {
headersTimeout: 300,
}).then((response) => {
console.log(response.statusCode)
})
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided Fastify server and undici.request reproduction, then trace the client timeout handling that is triggered by headersTimeout. Confirm the behavior for a timeout below one second and identify the existing timeout tests, if any; done means the reported sub-second timeout is honored without changing other timeout behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100