fix the "gc state" warning
This commit is contained in:
@@ -202,7 +202,8 @@ export default function extendConnector (Y/* :any */) {
|
||||
if (!conn.isSynced) {
|
||||
// it is crucial that isSynced is set at the time garbageCollectAfterSync is called
|
||||
conn.isSynced = true
|
||||
yield * this.garbageCollectAfterSync()
|
||||
// It is safer to remove this!
|
||||
// TODO: remove: yield * this.garbageCollectAfterSync()
|
||||
// call whensynced listeners
|
||||
for (var f of conn.whenSyncedListeners) {
|
||||
f()
|
||||
@@ -343,7 +344,8 @@ export default function extendConnector (Y/* :any */) {
|
||||
}
|
||||
defer.resolve()
|
||||
})
|
||||
/* then apply ds
|
||||
/*
|
||||
then apply ds
|
||||
db.whenTransactionsFinished().then(() => {
|
||||
db.requestTransaction(function * () {
|
||||
yield * this.applyDeleteSet(m.deleteSet)
|
||||
|
||||
@@ -39,6 +39,7 @@ export default function extendDatabase (Y /* :any */) {
|
||||
*/
|
||||
constructor (y, opts) {
|
||||
this.y = y
|
||||
opts.gc = opts.gc === true
|
||||
this.dbOpts = opts
|
||||
var os = this
|
||||
this.userId = null
|
||||
@@ -121,7 +122,7 @@ export default function extendDatabase (Y /* :any */) {
|
||||
this.startRepairCheck()
|
||||
}
|
||||
startGarbageCollector () {
|
||||
this.gc = this.dbOpts.gc == null || this.dbOpts.gc
|
||||
this.gc = this.dbOpts.gc
|
||||
if (this.gc) {
|
||||
this.gcTimeout = !this.dbOpts.gcTimeout ? 50000 : this.dbOpts.gcTimeout
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user