mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
nodejs: release dispatcher before environment teardown
This commit is contained in:
1 parent
62e0ded803
commit
af38323728
1 file changed
+1
-1
+1
-1
@@ -367,7 +367,6 @@ struct RunnerState
|
||||
state->closeError = error.what();
|
||||
}
|
||||
state->runner.join();
|
||||
state->dispatcher.Release();
|
||||
}
|
||||
|
||||
Napi::Error makeCloseError() const
|
||||
@@ -386,6 +385,7 @@ struct RunnerState
|
||||
auto state = *owner;
|
||||
state->finished = true;
|
||||
if (!state->envClosing) {
|
||||
state->dispatcher.Release();
|
||||
auto error = state->makeCloseError();
|
||||
for (auto& pending : state->operations)
|
||||
pending.second.deferred.Reject(error.Value());
|
||||
|
||||
Reference in new issue
Block a user