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

Server able to close all connections for given user #125

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

Conversation

nerd2
Copy link

@nerd2 nerd2 commented Oct 22, 2019

No description provided.

@belak
Copy link
Collaborator

belak commented Oct 23, 2019

I really like the idea behind this... can you think of any way to make this more generic? As an example, I've been experimenting with a git server in go, but it would be hard to use this there because traditionally everyone SSHs in as the git user even though we tag them later.

@@ -323,6 +326,19 @@ func (srv *Server) SetOption(option Option) error {
return option(srv)
}

func (srv *Server) CloseConnectionsForUser(user string) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is too specific to your use-case. A better way to generalize this would be to make connections exported or a hook to get all connections or something, so the specific implementations can do whatever they want with all the connections.

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.

3 participants