Merge pull request #12986 from zexi/webconsole-interface-cast

fix(webconsole): ISessionData convert to *session.RemoteConsoleInfo
This commit is contained in:
Zexi Li
2021-12-22 17:07:07 +08:00
committed by GitHub
+1 -1
View File
@@ -55,9 +55,9 @@ func (s *ConnectionServer) ServeHTTP(w http.ResponseWriter, req *http.Request) {
}
var srv http.Handler
protocol := sessionObj.GetProtocol()
info := sessionObj.ISessionData.(*session.RemoteConsoleInfo)
switch protocol {
case session.VNC, session.SPICE:
info := sessionObj.ISessionData.(*session.RemoteConsoleInfo)
if info.Hypervisor == api.HYPERVISOR_OPENSTACK {
srv, err = NewWebsocketProxyServer(sessionObj)
} else {