Merge pull request #3209 from zhipengzuo/master

clean up code because err is always nil
This commit is contained in:
Derek McGowan 2020-07-22 09:18:06 -07:00 committed by GitHub
commit 208d68bd5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,15 +72,10 @@ func (pbs *proxyBlobStore) serveLocal(ctx context.Context, w http.ResponseWriter
return false, nil return false, nil
} }
if err == nil {
proxyMetrics.BlobPush(uint64(localDesc.Size)) proxyMetrics.BlobPush(uint64(localDesc.Size))
return true, pbs.localStore.ServeBlob(ctx, w, r, dgst) return true, pbs.localStore.ServeBlob(ctx, w, r, dgst)
} }
return false, nil
}
func (pbs *proxyBlobStore) storeLocal(ctx context.Context, dgst digest.Digest) error { func (pbs *proxyBlobStore) storeLocal(ctx context.Context, dgst digest.Digest) error {
defer func() { defer func() {
mu.Lock() mu.Lock()