From 1c2748c04bbb789d940a2415d58b2c66fc06814b Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Tue, 27 Jun 2017 15:56:33 +0200 Subject: [PATCH] chore(Xapi#importDeltaVm): use asyncMap --- src/xapi/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xapi/index.js b/src/xapi/index.js index 31a957884..85d0c4d3f 100644 --- a/src/xapi/index.js +++ b/src/xapi/index.js @@ -30,6 +30,7 @@ import createSizeStream from '../size-stream' import fatfsBuffer, { init as fatfsBufferInit } from '../fatfs-buffer' import { mixin } from '../decorators' import { + asyncMap, camelToSnakeCase, createRawObject, ensureArray, @@ -941,10 +942,10 @@ export default class Xapi extends XapiBase { ]) // 2. Delete all VBDs which may have been created by the import. - await Promise.all(mapToArray( + await asyncMap( vm.$VBDs, - vbd => this._deleteVbd(vbd)::ignoreErrors() - )) + vbd => this._deleteVbd(vbd) + )::ignoreErrors() // 3. Create VDIs. const newVdis = await map(delta.vdis, async vdi => {