diff --git a/src/js/remote.js b/src/js/remote.js index 20717340cf..e1fd61c8da 100644 --- a/src/js/remote.js +++ b/src/js/remote.js @@ -348,11 +348,13 @@ Remote.prototype._set_state = function (state) { switch (state) { case 'online': this._online_state = 'open'; + this.emit('connect'); this.emit('connected'); break; case 'offline': this._online_state = 'closed'; + this.emit('disconnect'); this.emit('disconnected'); break; }