Fixed contract once not running stop callback.
This commit is contained in:
parent
3c17cf56b5
commit
7d061b786f
@ -593,6 +593,12 @@ async function _emit(contract: BaseContract, event: ContractEventName, args: Arr
|
|||||||
} catch (error) { }
|
} catch (error) { }
|
||||||
return !once;
|
return !once;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (sub.listeners.length === 0) {
|
||||||
|
sub.stop();
|
||||||
|
getInternal(contract).subs.delete(sub.tag);
|
||||||
|
}
|
||||||
|
|
||||||
return (count > 0);
|
return (count > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user