Deploy 12.1.2

This commit is contained in:
Kevin Jahns 2016-11-10 17:01:53 +01:00
parent 9769968c1c
commit 957d650f81
5 changed files with 19 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{
"name": "yjs",
"version": "12.1.1",
"version": "12.1.2",
"homepage": "y-js.org",
"authors": [
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"

16
y.es6
View File

@ -2782,7 +2782,6 @@ module.exports = function (Y /* : any*/) {
destroy () {
super.destroy()
this.waiting = null
this.awaiting = null
this.onevent = null
}
/*
@ -3612,6 +3611,7 @@ class YConfig {
this.options = opts
this.db = new Y[opts.db.name](this, opts.db)
this.connector = new Y[opts.connector.name](this, opts.connector)
this.connected = true
}
init (callback) {
var opts = this.options
@ -3648,10 +3648,20 @@ class YConfig {
return this.connector.isSynced
}
disconnect () {
return this.connector.disconnect()
if (this.connected) {
this.connected = false
return this.connector.disconnect()
} else {
return Promise.resolve()
}
}
reconnect () {
return this.connector.reconnect()
if (!this.connected) {
this.connected = true
return this.connector.reconnect()
} else {
return Promise.resolve()
}
}
destroy () {
var self = this

File diff suppressed because one or more lines are too long

6
y.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long