Close accepted VNC connections
This commit is contained in:
parent
b898769396
commit
5bee7a1814
|
|
@ -66,6 +66,8 @@ func runVNCVM(cmd *cobra.Command, args []string) (err error) {
|
|||
}
|
||||
|
||||
go func() {
|
||||
defer conn.Close()
|
||||
|
||||
wsConn, err := client.VMs().PortForward(cmd.Context(), name, vncPort, wait)
|
||||
if err != nil {
|
||||
fmt.Printf("failed to forward port: %v\n", err)
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ func runVNCWorker(cmd *cobra.Command, args []string) (err error) {
|
|||
}
|
||||
|
||||
go func() {
|
||||
defer conn.Close()
|
||||
|
||||
wsConn, err := client.Workers().PortForward(cmd.Context(), name, vncPort)
|
||||
if err != nil {
|
||||
fmt.Printf("failed to forward port: %v\n", err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue