Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement limit connections #1527

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

SimoneDutto
Copy link
Contributor

Description

This is an implementation of the MaxConcurrentRequest for the ssh server.
The implementation is a copy/paste of https://cs.opensource.google/go/x/net/+/refs/tags/v0.34.0:netutil/listen.go with an additional timeout.
In fact the LimitListener hangs forever the Accept() until a seat is made available, making it hard to test and also counter intuitive, because we want to close connection when we reach the limit.

The error from the SSH client is:
image

Note

This is the first simple implementation until we get a better way of doing it by interacting with the gliderlab/ssh server. I am working on a issue + pr to make it possible.

Engineering checklist

  • Documentation updated
  • Covered by unit tests
  • Covered by integration tests

Test instructions

@SimoneDutto SimoneDutto requested a review from a team as a code owner January 17, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant