Skip to content

Commit

Permalink
Harness: Ensure $DONE called only once in async-gc.js
Browse files Browse the repository at this point in the history
This looks like a bug: resolveAsyncGC() is supposed to succeed if the
thrown value is asyncGC.notCollected, but instead it would call $DONE()
twice. An added "return" prevents that.
  • Loading branch information
ptomato authored and Ms2ger committed Oct 12, 2022
1 parent 1bb7ece commit ee7c379
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions harness/async-gc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function resolveAsyncGC(err) {
if (err === asyncGC.notCollected) {
// Do not fail as GC can't provide necessary resources.
$DONE();
return;
}

$DONE(err);
Expand Down

0 comments on commit ee7c379

Please sign in to comment.