fix shim reaper wait command execute blocked

wait no timeout will lead to event publish
process hang in some special scenarios.

Signed-off-by: botieking98 <botieking@gmail.com>
This commit is contained in:
botieking98
2021-10-27 14:58:31 +08:00
parent aa65faebd7
commit 3e51312a61
2 changed files with 24 additions and 1 deletions

View File

@@ -308,7 +308,7 @@ func (l *remoteEventsPublisher) Publish(ctx context.Context, topic string, event
if err != nil {
return err
}
status, err := reaper.Default.Wait(cmd, c)
status, err := reaper.Default.WaitTimeout(cmd, c, 30*time.Second)
if err != nil {
return errors.Wrapf(err, "failed to publish event: %s", b.String())
}