mirror of https://github.com/apache/cloudstack.git
bug CS-15179: ensure route before connecting
Reviewed-by: anthony
This commit is contained in:
parent
3e16945914
commit
1f16957369
|
|
@ -70,6 +70,8 @@ public class ConsoleProxyVncClient extends ConsoleProxyClientBase {
|
|||
if(tunnelUrl != null && !tunnelUrl.isEmpty() && tunnelSession != null && !tunnelSession.isEmpty()) {
|
||||
URI uri = new URI(tunnelUrl);
|
||||
s_logger.info("Connect to VNC server via tunnel. url: " + tunnelUrl + ", session: " + tunnelSession);
|
||||
|
||||
ConsoleProxy.ensureRoute(uri.getHost());
|
||||
client.connectTo(
|
||||
uri.getHost(), uri.getPort(),
|
||||
uri.getPath() + "?" + uri.getQuery(),
|
||||
|
|
@ -77,6 +79,7 @@ public class ConsoleProxyVncClient extends ConsoleProxyClientBase {
|
|||
getClientHostPassword());
|
||||
} else {
|
||||
s_logger.info("Connect to VNC server directly. host: " + getClientHostAddress() + ", port: " + getClientHostPort());
|
||||
ConsoleProxy.ensureRoute(getClientHostAddress());
|
||||
client.connectTo(getClientHostAddress(), getClientHostPort(), getClientHostPassword());
|
||||
}
|
||||
} catch (UnknownHostException e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue