You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2016/07/22 02:51:01 UTC
[7/8] incubator-guacamole-client git commit: GUACAMOLE-5: Do not
attempt to join a closed connection.
GUACAMOLE-5: Do not attempt to join a closed connection.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/702441d7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/702441d7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/702441d7
Branch: refs/heads/master
Commit: 702441d7208c1f4ea4d5db424d68b4f68f6de985
Parents: 43761ef
Author: Michael Jumper <mj...@apache.org>
Authored: Thu Jul 21 15:16:34 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Thu Jul 21 15:35:32 2016 -0700
----------------------------------------------------------------------
.../auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java | 2 +-
.../guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java | 8 ++------
2 files changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/702441d7/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java
index 2d5e1f8..d825631 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java
@@ -467,7 +467,7 @@ public abstract class AbstractGuacamoleTunnelService implements GuacamoleTunnelS
// Verify that the connection ID is known
String connectionID = activeConnection.getConnectionID();
- if (connectionID == null)
+ if (!activeConnection.isActive() || connectionID == null)
throw new GuacamoleResourceNotFoundException("No existing connection to be joined.");
// Build configuration from the sharing profile and the ID of
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/702441d7/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java
index f768f23..16da689 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/ActiveConnectionRecord.java
@@ -36,8 +36,7 @@ import org.apache.guacamole.protocol.ConfiguredGuacamoleSocket;
/**
* A connection record implementation that describes an active connection. As
* the associated connection has not yet ended, getEndDate() will always return
- * null, and isActive() will always return true. The associated start date will
- * be the time of this objects creation.
+ * null. The associated start date will be the time of this objects creation.
*
* @author Michael Jumper
*/
@@ -325,10 +324,7 @@ public class ActiveConnectionRecord implements ConnectionRecord {
@Override
public boolean isActive() {
-
- // Active connections are active by definition
- return true;
-
+ return tunnel != null && tunnel.isOpen();
}
/**