Do not clear objects on disconnect.

This commit is contained in:
Julien Fontanet 2015-02-10 20:12:48 +01:00
parent 4e0a3da01e
commit 5ae45ddd55

View File

@ -229,7 +229,6 @@ function Xo(opts) {
self._api.on('disconnected', function () {
self._connection = null;
self.objects.clear();
self.status = 'disconnected';
// Automatically reconnect.
@ -274,6 +273,7 @@ function onSuccessfulConnection() {
this.status = 'connected';
this._api.call('xo.getAllObjects').bind(this).then(function (objects) {
this.objects.clear();
this.objects.setMultiple(objects);
});
});