Skip to content

max_concurrent_per_repo=0 passes validation and stalls Git requests #79

Description

@behinddwalls

Summary

server.max_concurrent_per_repo = 0 passes configuration validation but creates a semaphore with no permits, causing Git requests to wait indefinitely.

Current behavior

Validation accepts zero for the per-repository concurrency setting. The request middleware then constructs a zero-permit semaphore, so no request can acquire a permit and clients stall without useful progress or an immediate configuration error.

Expected behavior

Configuration validation should reject zero, or zero should have a clearly defined non-blocking meaning such as disabling the limit.

Suggested implementation

Require max_concurrent_per_repo to be greater than zero during validation and add a regression test for the invalid configuration. Rejecting zero is preferable unless an unlimited sentinel is intentionally documented and implemented.

Relevant code

  • crates/walgit-config/src/lib.rs:1079
  • crates/walgit-server/src/middleware.rs:147

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