From f26f8b2af909beff6393441c632326e753165ae4 Mon Sep 17 00:00:00 2001 From: Pierre Donias Date: Wed, 23 Jan 2019 15:16:41 +0100 Subject: [PATCH] fix(xo-server/_getXenUpdates): call readAll with context (#3897) --- packages/xo-server/src/xapi/mixins/patching.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/xo-server/src/xapi/mixins/patching.js b/packages/xo-server/src/xapi/mixins/patching.js index fdb0985ec..36c751105 100644 --- a/packages/xo-server/src/xapi/mixins/patching.js +++ b/packages/xo-server/src/xapi/mixins/patching.js @@ -29,15 +29,15 @@ export default { // FIXME: should be static @debounce(24 * 60 * 60 * 1000) async _getXenUpdates() { - const { readAll, statusCode } = await this.xo.httpRequest( + const response = await this.xo.httpRequest( 'http://updates.xensource.com/XenServer/updates.xml' ) - if (statusCode !== 200) { + if (response.statusCode !== 200) { throw new Error('cannot fetch patches list from Citrix') } - const data = parseXml(await readAll()).patchdata + const data = parseXml(await response.readAll()).patchdata const patches = { __proto__: null } forEach(data.patches.patch, patch => {