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

Fixes #3091 Auction closing prematurely #3096

Merged
merged 2 commits into from
Sep 17, 2018
Merged

Conversation

jaiminpanchal27
Copy link
Collaborator

Type of change

  • Bugfix

Description of change

Fixes #3091 Auction closing prematurely

Copy link
Member

@mkendall07 mkendall07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few nits but overall looks good.

assert.equal(doneSpy.callCount, 1);
});

it('should call auction done after prebid cache is complete for mediaType video', function() {
debugger; // eslint-disable-line
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stray debugger.

src/auction.js Outdated
let doneCalled = false;
let allAdapterCalledDone = false;

let areAllAdapterDone = delayExecution(() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice usage here. One knit (I know it's not part of this PR) but the name of this function is somewhat confusing. I was expecting it to wait for the next turn of the event loop, but it's synchronous.

src/auction.js Outdated
doneCalled = true;
if ((outstandingBidsAdded === 0)) {
areAllAdapterDone();
if (allAdapterCalledDone && (outstandingBidsAdded === 0)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double parentheses are not needed here.

@jaiminpanchal27 jaiminpanchal27 merged commit 18bf25b into master Sep 17, 2018
janua pushed a commit to guardian/Prebid.js that referenced this pull request Sep 24, 2018
* auction closing early fix

* minor updates after code review
ptomasroos pushed a commit to happypancake/Prebid.js that referenced this pull request Sep 25, 2018
* auction closing early fix

* minor updates after code review
pedrolopezmrf pushed a commit to Marfeel/Prebid.js that referenced this pull request Mar 18, 2019
* auction closing early fix

* minor updates after code review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auction ends prematurely [1.24.0]
2 participants