Minor changes.
This commit is contained in:
parent
d76cb440f9
commit
1d3616ae71
@ -30,19 +30,6 @@ function noop() {}
|
|||||||
|
|
||||||
//====================================================================
|
//====================================================================
|
||||||
|
|
||||||
//====================================================================
|
|
||||||
|
|
||||||
var objectsOptions = {
|
|
||||||
indexes: [
|
|
||||||
'ref',
|
|
||||||
'type',
|
|
||||||
'UUID',
|
|
||||||
],
|
|
||||||
key: function (item) {
|
|
||||||
return item.UUID || item.ref;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
// Try connecting to Xo-Server.
|
// Try connecting to Xo-Server.
|
||||||
function tryConnect() {
|
function tryConnect() {
|
||||||
/* jshint validthis: true */
|
/* jshint validthis: true */
|
||||||
@ -127,10 +114,17 @@ function Xo(opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._api = new Api(opts.url);
|
this._api = new Api(opts.url);
|
||||||
this._backOff = new BackOff(function () {
|
this._backOff = new BackOff();
|
||||||
return fibonacci(1e3);
|
this.objects = createCollection({
|
||||||
|
indexes: [
|
||||||
|
'ref',
|
||||||
|
'type',
|
||||||
|
'UUID',
|
||||||
|
],
|
||||||
|
key: function (item) {
|
||||||
|
return item.UUID || item.ref;
|
||||||
|
},
|
||||||
});
|
});
|
||||||
this.objects = createCollection(objectsOptions);
|
|
||||||
this.status = 'disconnected';
|
this.status = 'disconnected';
|
||||||
|
|
||||||
self._api.on('connected', function () {
|
self._api.on('connected', function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user