Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/command/vnc/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions internal/command/vnc/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down