Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Fix backend logging issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nwmac committed Jun 3, 2020
1 parent dc394aa commit 5899bfd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/jetstream/plugins/kubernetes/terminal/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ func (k *KubeTerminal) Start(c echo.Context) error {

if err != nil {
k.cleanupPodAndSecret(podData)
return errors.New("Could not make request")
log.Warn("Kube Terminal: Could not connect to pod")
// No point returning an error - we've already upgraded to web sockets, so we can't use the HTTP response now
return nil
}

stdoutDone := make(chan bool)
Expand All @@ -154,7 +156,9 @@ func (k *KubeTerminal) Start(c echo.Context) error {
}
log.Warn("Kube Terminal cleaning up ....")
k.cleanupPodAndSecret(podData)
return err

// No point returning an error - we've already upgraded to web sockets, so we can't use the HTTP response now
return nil
}

res := KeyCode{}
Expand Down

0 comments on commit 5899bfd

Please sign in to comment.