GUACAMOLE-267: Do not require ConfiguredGuacamoleSocket for all active connections.

This commit is contained in:
Michael Jumper
2017-04-16 21:10:25 -07:00
parent ad3fcb59ca
commit 8b9b4881b7
2 changed files with 10 additions and 6 deletions

View File

@@ -488,7 +488,7 @@ public abstract class AbstractGuacamoleTunnelService implements GuacamoleTunnelS
getUnconfiguredGuacamoleSocket(cleanupTask), config, info);
// Assign and return new tunnel
return activeConnection.assignGuacamoleTunnel(socket);
return activeConnection.assignGuacamoleTunnel(socket, socket.getConnectionID());
}

View File

@@ -366,13 +366,17 @@ public class ActiveConnectionRecord implements ConnectionRecord {
* given socket.
*
* @param socket
* The ConfiguredGuacamoleSocket to use to create the tunnel associated
* with this connection record.
* The GuacamoleSocket to use to create the tunnel associated with this
* connection record.
*
* @param connectionID
* The connection ID assigned to this connection by guacd.
*
* @return
* The newly-created tunnel associated with this connection record.
*/
public GuacamoleTunnel assignGuacamoleTunnel(final ConfiguredGuacamoleSocket socket) {
public GuacamoleTunnel assignGuacamoleTunnel(final GuacamoleSocket socket,
String connectionID) {
// Create tunnel with given socket
this.tunnel = new AbstractGuacamoleTunnel() {
@@ -391,7 +395,7 @@ public class ActiveConnectionRecord implements ConnectionRecord {
// Store connection ID of the primary connection only
if (isPrimaryConnection())
this.connectionID = socket.getConnectionID();
this.connectionID = connectionID;
// Return newly-created tunnel
return this.tunnel;