Skip to content

Commit

Permalink
Cache validation fix: minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Veronika Solovei committed May 29, 2019
1 parent 3e84ad8 commit 043be36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion exchange/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@ func (e *exchange) HoldAuction(ctx context.Context, bidRequest *openrtb.BidReque
}
if anyBidsReturned {
bidCategory, adapterBids, err := applyCategoryMapping(ctx, requestExt, adapterBids, *categoriesFetcher, targData)
auc := newAuction(adapterBids, len(bidRequest.Imp))
if err != nil {
return nil, fmt.Errorf("Error in category mapping : %s", err.Error())
}

auc := newAuction(adapterBids, len(bidRequest.Imp))

if targData != nil {
auc.setRoundedPrices(targData.priceGranularity)
cacheErrs := auc.doCache(ctx, e.cache, targData, bidRequest, 60, &e.defaultTTLs, bidCategory)
Expand Down

0 comments on commit 043be36

Please sign in to comment.