diff --git a/pkg/streamer/console/console.go b/pkg/streamer/console/console.go index 405657e..d9532d1 100644 --- a/pkg/streamer/console/console.go +++ b/pkg/streamer/console/console.go @@ -351,8 +351,14 @@ func (m *Streamer) connectConsolePort(ctx context.Context) (err error) { bytes.HasSuffix(res, []byte(" not found\r\n")): return ThrowBadConsolePortException(res) case bytes.HasPrefix(res, []byte("@")) || unicode.IsDigit(rune(res[0])): - //redirect - newPort, err := strconv.Atoi(strings.TrimSpace(string(res))) + // redirect + redirect := strings.TrimSpace(string(res)) + var newPort int + if strings.HasPrefix(redirect, "@") { + return fmt.Errorf("conserver redirecting to host %v", redirect) + } + // just port + newPort, err = strconv.Atoi(redirect) if err != nil { return err }