Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emit AUCTION_END event before bidsBackHandler callback #884

Merged
merged 1 commit into from
Dec 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/bidmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {uniques, flatten, adUnitsFilter} from './utils';
import {getPriceBucketString} from './cpmBucketManager';

var CONSTANTS = require('./constants.json');
var AUCTION_END = CONSTANTS.EVENTS.AUCTION_END;
var utils = require('./utils.js');
var events = require('./events');

Expand Down Expand Up @@ -257,6 +258,7 @@ exports.executeCallback = function (timedOut) {

//execute one time callback
if (externalCallbacks.oneTime) {
events.emit(AUCTION_END);
try {
processCallbacks([externalCallbacks.oneTime]);
}
Expand Down
2 changes: 0 additions & 2 deletions src/prebid.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ var objectType_function = 'function';
var objectType_undefined = 'undefined';
var objectType_object = 'object';
var BID_WON = CONSTANTS.EVENTS.BID_WON;
var AUCTION_END = CONSTANTS.EVENTS.AUCTION_END;

var auctionRunning = false;
var bidRequestQueue = [];
Expand Down Expand Up @@ -485,7 +484,6 @@ $$PREBID_GLOBAL$$.removeAdUnit = function (adUnitCode) {
$$PREBID_GLOBAL$$.clearAuction = function() {
auctionRunning = false;
utils.logMessage('Prebid auction cleared');
events.emit(AUCTION_END);
if (bidRequestQueue.length) {
bidRequestQueue.shift()();
}
Expand Down