Closed gsvarovsky closed 3 years ago
Is it a problem in AsyncIterator? Then we likely want to fix it over there.
On mobile now, but looks like a problem in this library (and hence your fix seems correct). I believe the _end
method should be prepared to be called multiple times; but it’s probably best to document that in AsyncIterator.
@gsvarovsky looks like your workaround is not a workaround but an actual fix! Thank you for this and thank you @RubenVerborgh for reviewing, I'll merge and release in the next few days!
Released in v7.2.1!
This is a workaround for a race condition in AsyncIterator, which arises during my unit tests, in which
_end
is called on theLevelIterator
twice, asynchronously from:The outcome in node-quadstore is that the LevelDown
AbstractIterator
is ended twice, which throws the second time.I have yet to reproduce this problem either in node-quadstore or in base AsyncIterator.
cc @RubenVerborgh, just in case the cause is obvious.