Skip to content

Commit

Permalink
Merge pull request containerd#5293 from wzshiming/fix/eveny-error-mes…
Browse files Browse the repository at this point in the history
…sage

 Fix return event publishing error
  • Loading branch information
dmcgowan authored Apr 14, 2021
2 parents c381ea2 + 45df696 commit 5c6ea7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/containerd-shim/main_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,10 @@ func (l *remoteEventsPublisher) Publish(ctx context.Context, topic string, event
cmd := exec.CommandContext(ctx, containerdBinaryFlag, "--address", l.address, "publish", "--topic", topic, "--namespace", ns)
cmd.Stdin = bytes.NewReader(data)
b := bufPool.Get().(*bytes.Buffer)
defer bufPool.Put(b)
defer func() {
b.Reset()
bufPool.Put(b)
}()
cmd.Stdout = b
cmd.Stderr = b
c, err := reaper.Default.Start(cmd)
Expand Down

0 comments on commit 5c6ea7f

Please sign in to comment.