mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-13 23:35:46 +00:00
fix(@embark/test-runenr): fix event listener overflow
This commit is contained in:
parent
09d7428e7e
commit
e288483661
@ -199,6 +199,16 @@ class Test {
|
||||
self.ready = false;
|
||||
|
||||
async.waterfall([
|
||||
function cleanContracts(next) {
|
||||
Object.keys(self.contracts).forEach(contractName => {
|
||||
if (self.contracts[contractName]._requestManager) {
|
||||
// Remove all data listeners from the contract provider as a listener for `data` is added for each new contract
|
||||
// Removing directly as contract.removeSubscriptions throws errors and doesn't really unsubscribe
|
||||
self.contracts[contractName]._requestManager.provider.removeAllListeners('data');
|
||||
}
|
||||
});
|
||||
next();
|
||||
},
|
||||
function checkDeploymentOpts(next) {
|
||||
self.checkDeploymentOptions(options, next);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user