|
@@ -191,9 +191,11 @@ func (daemon *Daemon) ProcessEvent(id string, e libcontainerdtypes.EventType, ei
|
|
|
execConfig.StreamConfig.Wait(ctx)
|
|
|
cancel()
|
|
|
|
|
|
- if err := execConfig.CloseStreams(); err != nil {
|
|
|
+ ctx, cancel = context.WithTimeout(context.Background(), 2*time.Second)
|
|
|
+ if err := execConfig.CloseStreams(ctx); err != nil {
|
|
|
log.G(ctx).Errorf("failed to cleanup exec %s streams: %s", c.ID, err)
|
|
|
}
|
|
|
+ cancel()
|
|
|
|
|
|
exitCode = ec
|
|
|
|