Skip to content

Commit

Permalink
fix: remove unused sleep for plugin execution (#4179)
Browse files Browse the repository at this point in the history
close #4101
  • Loading branch information
Pantani committed Jun 5, 2024
1 parent e8ab212 commit 24770f1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ignite/internal/plugin/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package plugininternal
import (
"bytes"
"context"
"time"

"google.golang.org/grpc/status"

Expand Down Expand Up @@ -37,10 +36,7 @@ func Execute(ctx context.Context, path string, args []string, options ...plugin.
// We don't want Execute to return rpc errors.
return "", errors.New(status.Convert(err).Message())
}
// NOTE(tb): This pause gives enough time for go-plugin to sync the
// output from stdout/stderr of the plugin. Without that pause, this
// output can be discarded and absent from buf.
time.Sleep(100 * time.Millisecond)

plugins[0].KillClient()
return buf.String(), err
}

0 comments on commit 24770f1

Please sign in to comment.