You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by lg...@apache.org on 2015/12/08 08:48:58 UTC
[2/2] mina-sshd git commit: Send SSH2_DISCONNECT_TOO_MANY_CONNECTIONS
as disconnect reason if max. configured concurrent session limit exceeded
Send SSH2_DISCONNECT_TOO_MANY_CONNECTIONS as disconnect reason if max. configured concurrent session limit exceeded
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/567a6af7
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/567a6af7
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/567a6af7
Branch: refs/heads/master
Commit: 567a6af73d9bafc324f99c58c3b23ae1aa1ce1c7
Parents: c5b3771
Author: Lyor Goldstein <lg...@vmware.com>
Authored: Tue Dec 8 09:48:42 2015 +0200
Committer: Lyor Goldstein <lg...@vmware.com>
Committed: Tue Dec 8 09:48:42 2015 +0200
----------------------------------------------------------------------
.../java/org/apache/sshd/server/session/ServerUserAuthService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/567a6af7/sshd-core/src/main/java/org/apache/sshd/server/session/ServerUserAuthService.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/server/session/ServerUserAuthService.java b/sshd-core/src/main/java/org/apache/sshd/server/session/ServerUserAuthService.java
index dcded35..977bdc4 100644
--- a/sshd-core/src/main/java/org/apache/sshd/server/session/ServerUserAuthService.java
+++ b/sshd-core/src/main/java/org/apache/sshd/server/session/ServerUserAuthService.java
@@ -220,7 +220,7 @@ public class ServerUserAuthService extends AbstractCloseable implements Service,
if (maxSessionCount != null) {
int currentSessionCount = session.getActiveSessionCountForUser(username);
if (currentSessionCount >= maxSessionCount) {
- session.disconnect(SshConstants.SSH2_DISCONNECT_SERVICE_NOT_AVAILABLE,
+ session.disconnect(SshConstants.SSH2_DISCONNECT_TOO_MANY_CONNECTIONS,
"Too many concurrent connections (" + currentSessionCount + ") - max. allowed: " + maxSessionCount);
return;
}