Skip to content

Block expire time is wrong.  #2208

Open
@zhang-quan-yi

Description

@zhang-quan-yi

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

I set the ttl to 10s, and the limit to 10 times.
When I request the API 10 times in 0s, 1s, 2s... 9s. the next request can only be called at (9 + 10)s.
I think the next request can be called at (9 + 1)s, after the first call expired.

Minimum reproduction code

no need.

Steps to reproduce

No response

Expected behavior

I think the next request can be called at (9 + 1)s, after the first call expired.

Package version

6.3.0

NestJS version

10.0.0

Node.js version

v22.11.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

Metadata

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