this._queue.push(msg);
this._socket.send(msg, function(x) {
_this.log(0x1, 'send: ' + msg + ':', x);
+ if (x.bytesWritten < 0) {
+ _this.log(0x1, 'reconnecting...');
+ _this._socket.reconnect();
+ _this.queue = [msg];
+ _this._socket.send(msg);
+ }
});
}
++i;
}
this.state.Playlist = playlist;
+ this.state.Playlist.lastUpdate = (new Date()).getTime();
this._cb_update_state(this.state);
break;
case 'currentsong':
this.state.Currentsong = this._parse_result(lines).state;
+ this.state.Currentsong.lastUpdate = (new Date()).getTime();
this._cb_update_state(this.state);
break;