Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.

Commit 6365982

Browse files
committed
clears replicator flush timer interval
1 parent 5175c01 commit 6365982

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Store.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ class Store {
177177
// TODO: afaik we don't use 'closed' event anymore,
178178
// to be removed in future releases
179179
this.events.emit('closed', this.address.toString())
180+
181+
//Clears the queue flusher instatiated at ./Replicator.js:36
182+
clearInterval(this._replicator._flushTimer);
180183
return Promise.resolve()
181184
}
182185

@@ -438,7 +441,7 @@ class Store {
438441

439442
_recalculateReplicationProgress (max) {
440443
this._replicationStatus.progress = Math.max.apply(null, [
441-
this._replicationStatus.progress,
444+
this._replicationStatus.progress,
442445
this._oplog.length,
443446
max || 0,
444447
])
@@ -447,8 +450,8 @@ class Store {
447450

448451
_recalculateReplicationMax (max) {
449452
this._replicationStatus.max = Math.max.apply(null, [
450-
this._replicationStatus.max,
451-
this._oplog.length,
453+
this._replicationStatus.max,
454+
this._oplog.length,
452455
max || 0,
453456
])
454457
}

0 commit comments

Comments
 (0)