Xapi#importVm() crash on failure.

This commit is contained in:
Julien Fontanet 2015-11-10 21:28:01 +01:00
parent 135799ed5e
commit e5c0250423

View File

@ -873,6 +873,12 @@ export default class Xapi extends XapiBase {
stream.pipe(request)
// An error can occur after the finish event and therefore will
// not be handled by eventToPromise().
//
// As a consequence, add an empty error handler to avoid a crash.
request.on('error', noop)
await eventToPromise(request, 'finish')
// The request will never finish because the XAPI has no way to no