Skip to content

When setting block=True in 0.20.0, nothing happens #77

Description

@c3101

The following just "hangs" when the limit is reached, sits for about the length of time of Duration.SECOND * int(config.rate_limit.time_seconds), keeping the connection alive, and returns like nothing happened after about the length of time of Duration.SECOND * int(config.rate_limit.time_seconds).

No HTTP_429_TOO_MANY_REQUESTS returned.

@router.post(
    path="/login",
    dependencies=[
        Depends(
            RateLimiter(
                limiter=Limiter(
                    Rate(
                        int(config.rate_limit.number_of_attempts),
                        Duration.SECOND * int(config.rate_limit.time_seconds),
                    )
                ),
                blocking=True,
            )
        )
    ],
)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions