fix: ensure initial ReadCloser stream gets closed properly after copying

This commit is contained in:
sbaier 2021-10-26 20:24:53 +02:00
parent 5a65aff05d
commit f365ace320

View File

@ -131,6 +131,10 @@ func loadImageFromStream(ctx context.Context, runtime runtimes.Runtime, stream i
if err != nil { if err != nil {
l.Log().Errorf("Failed to copy read stream. %v", err) l.Log().Errorf("Failed to copy read stream. %v", err)
} }
err = stream.Close()
if err != nil {
l.Log().Errorf("Failed to close stream. %v", err)
}
}() }()
pipeId := 0 pipeId := 0