chore(xen-api/connect): assert initially disconnected

This commit is contained in:
Julien Fontanet 2019-03-28 18:19:18 +01:00
parent 1dfb50fefd
commit e1da08ba38

View File

@ -1,3 +1,4 @@
import assert from 'assert'
import Collection from 'xo-collection'
import kindOf from 'kindof'
import ms from 'ms'
@ -210,9 +211,7 @@ export class Xapi extends EventEmitter {
return
}
if (status === CONNECTING) {
throw new Error('already connecting')
}
assert(status === DISCONNECTED)
const auth = this._auth