Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling startup error on Piped #2732

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions pkg/app/launcher/cmd/launcher/launcher.go
Expand Up @@ -267,12 +267,17 @@ func (l *launcher) run(ctx context.Context, input cli.Input) error {

group.Go(func() error {
// Execute the first time immediately.
execute()
if err := execute(); err != nil {
input.Logger.Error("LAUNCHER: failed while launching new Piped", zap.Error(err))
// Return an error if the initial startup fails.
return err
}

for {
select {
case <-ticker.C:
execute()
// Don't return an error to continue piped execution.
_ = execute()
kurochan marked this conversation as resolved.
Show resolved Hide resolved

case <-ctx.Done():
// Stop old piped process and clean its data.
Expand Down