Skip to content

Timeout breaking change #4055

Open
Open
@artur-ma

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)
})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions