aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-10-30 18:05:02 +0800
committerFabio Berger <me@fabioberger.com>2017-10-31 00:49:16 +0800
commita6c110f55827f06c6942806a1eec58dfa23f5385 (patch)
tree644d73babb6170d1b1b20dc06356a23a3b167e97
parent02b33f988f2ffa3e02fcb1c88987498cf35c42cc (diff)
downloaddexon-0x-contracts-a6c110f55827f06c6942806a1eec58dfa23f5385.tar.gz
dexon-0x-contracts-a6c110f55827f06c6942806a1eec58dfa23f5385.tar.zst
dexon-0x-contracts-a6c110f55827f06c6942806a1eec58dfa23f5385.zip
Clear event cache on unsubscribe
-rw-r--r--src/mempool/event_watcher.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mempool/event_watcher.ts b/src/mempool/event_watcher.ts
index e28219682..1ad30b790 100644
--- a/src/mempool/event_watcher.ts
+++ b/src/mempool/event_watcher.ts
@@ -26,6 +26,7 @@ export class EventWatcher {
}
public unsubscribe(): void {
delete this._callback;
+ this._lastMempoolEvents = [];
intervalUtils.clearAsyncExcludingInterval(this._intervalId);
}
private async _pollForMempoolEventsAsync(): Promise<void> {