fix gc timeout
This commit is contained in:
@@ -79,7 +79,7 @@ export default function extendDatabase (Y /* :any */) {
|
||||
|
||||
function garbageCollect () {
|
||||
return os.whenTransactionsFinished().then(function () {
|
||||
if (os.gc1.length > 0 || os.gc2.length > 0) {
|
||||
if (os.gcTimeout > 0 && (os.gc1.length > 0 || os.gc2.length > 0)) {
|
||||
if (!os.y.connector.isSynced) {
|
||||
console.warn('gc should be empty when not synced!')
|
||||
}
|
||||
@@ -265,7 +265,7 @@ export default function extendDatabase (Y /* :any */) {
|
||||
}
|
||||
}
|
||||
* destroy () {
|
||||
clearInterval(this.gcInterval)
|
||||
clearTimeout(this.gcInterval)
|
||||
this.gcInterval = null
|
||||
this.stopRepairCheck()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user