Sfoglia il codice sorgente

Merge pull request #15965 from tonistiigi/pull-goroutine-leak

Fix goroutine leak on pull
Brian Goff 10 anni fa
parent
commit
3b2c9fa049
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      graph/pull_v2.go

+ 3 - 0
graph/pull_v2.go

@@ -230,6 +230,9 @@ func (p *v2Puller) pullV2Tag(out io.Writer, tag, taggedName string) (verified bo
 			// set the error. All successive reads/writes will return with this
 			// error.
 			pipeWriter.CloseWithError(errors.New("download canceled"))
+		} else {
+			// If no error then just close the pipe.
+			pipeWriter.Close()
 		}
 	}()