Skip to content

Commit

Permalink
prebid server should fire BIDDER_DONE event (prebid#2552)
Browse files Browse the repository at this point in the history
  • Loading branch information
snapwich authored and dluxemburg committed Jul 17, 2018
1 parent 7d0c0cd commit 745ea19
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/prebidServerBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import Adapter from 'src/adapter';
import bidfactory from 'src/bidfactory';
import * as utils from 'src/utils';
import { ajax } from 'src/ajax';
import { STATUS, S2S } from 'src/constants';
import { STATUS, S2S, EVENTS } from 'src/constants';
import { cookieSet } from 'src/cookie.js';
import adaptermanager from 'src/adaptermanager';
import { config } from 'src/config';
import { VIDEO } from 'src/mediaTypes';
import { isValid } from 'src/adapters/bidderFactory';
import events from 'src/events';
import includes from 'core-js/library/fn/array/includes';

const getConfig = config.getConfig;
Expand Down Expand Up @@ -718,6 +719,10 @@ export function PrebidServer() {
}
});

bidRequests.forEach((bidRequest) => {
events.emit(EVENTS.BIDDER_DONE, bidRequest);
});

if (result.status === 'no_cookie' && _s2sConfig.cookieSet && typeof _s2sConfig.cookieSetUrl === 'string') {
// cookie sync
cookieSet(_s2sConfig.cookieSetUrl);
Expand Down

0 comments on commit 745ea19

Please sign in to comment.