@Override
    @OnClose
    public void onClose(Session session, CloseReason closeReason) {

        try {
            if (tunnel != null)
                tunnel.close();
        }
        catch (GuacamoleException e) {
            logger.debug("Unable to close WebSocket tunnel.", e);
        }
        
    }
Returns a new tunnel for the given session. How this tunnel is created
or retrieved is implementation-dependent.

@param session The session associated with the active WebSocket
               connection.
@param config Configuration information associated with the instance of
              the endpoint created for handling this single connection.
@return A connected tunnel, or null if no such tunnel exists.
@throws GuacamoleException If an error occurs while retrieving the
                           tunnel, or if access to the tunnel is denied.
guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java