diff --git a/packages/xen-api/src/index.js b/packages/xen-api/src/index.js index 9f030e8d3..6face33b8 100644 --- a/packages/xen-api/src/index.js +++ b/packages/xen-api/src/index.js @@ -244,7 +244,7 @@ export class Xapi extends EventEmitter { debug('%s: connected', this._humanId) this.emit(CONNECTED) } catch (error) { - this._sessionId = null + ignoreErrors.call(this.disconnect()) throw error }