Skip to content

🐛 [Bug]: timeout is not actually enforced #3671

@own2pwn

Description

@own2pwn

Bug Description

Doesn't this just check for an error afterward? From what I see, the timeout doesn't actually stop the handler from running. It also doesn't pass the cancellation down the call stack, so inside the handler there's no way to check if the request has timed out.

tCtx, cancel := context.WithTimeout(ctx, timeout)
defer cancel()
err := runHandler(ctx, h, cfg)

How to Reproduce

Steps to reproduce the behavior:

  1. Go to '....'
  2. Click on '....'
  3. Do '....'
  4. See '....'

Expected Behavior

Context(tCtx) with cancelation is passed down

Fiber Version

v3.0.0-beta.5

Code Snippet (optional)

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my problem prior to opening this one.
  • I understand that improperly formatted bug reports may be closed without explanation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions