Fixed Contract filter never unsubscribing.
This commit is contained in:
parent
284771ea39
commit
39c78f37ce
@ -717,13 +717,13 @@ export class Contract {
|
||||
_checkRunningEvents(runningEvent: RunningEvent): void {
|
||||
if (runningEvent.listenerCount() === 0) {
|
||||
delete this._runningEvents[runningEvent.tag];
|
||||
}
|
||||
|
||||
// If we have a poller for this, remove it
|
||||
const emit = this._wrappedEmits[runningEvent.tag];
|
||||
if (!emit) {
|
||||
this.provider.off(runningEvent.filter, emit);
|
||||
delete this._wrappedEmits[runningEvent.tag];
|
||||
// If we have a poller for this, remove it
|
||||
const emit = this._wrappedEmits[runningEvent.tag];
|
||||
if (emit) {
|
||||
this.provider.off(runningEvent.filter, emit);
|
||||
delete this._wrappedEmits[runningEvent.tag];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user