Add timeout for I/O waitgroups
Closes #3286 This and a combination of a couple Docker changes are needed to fully resolve the issue on the Docker side. However, this ensures that after processes exit, we still leave some time for the I/O to fully flush before closing. Without this timeout, the delete methods would block forever. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -284,7 +284,7 @@ func (p *Init) Delete(ctx context.Context) error {
|
||||
}
|
||||
|
||||
func (p *Init) delete(ctx context.Context) error {
|
||||
p.wg.Wait()
|
||||
waitTimeout(ctx, &p.wg, 2*time.Second)
|
||||
err := p.runtime.Delete(ctx, p.id, nil)
|
||||
// ignore errors if a runtime has already deleted the process
|
||||
// but we still hold metadata and pipes
|
||||
|
||||
Reference in New Issue
Block a user