chore(xen-api/connect): assert initially disconnected
This commit is contained in:
parent
1dfb50fefd
commit
e1da08ba38
@ -1,3 +1,4 @@
|
|||||||
|
import assert from 'assert'
|
||||||
import Collection from 'xo-collection'
|
import Collection from 'xo-collection'
|
||||||
import kindOf from 'kindof'
|
import kindOf from 'kindof'
|
||||||
import ms from 'ms'
|
import ms from 'ms'
|
||||||
@ -210,9 +211,7 @@ export class Xapi extends EventEmitter {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status === CONNECTING) {
|
assert(status === DISCONNECTED)
|
||||||
throw new Error('already connecting')
|
|
||||||
}
|
|
||||||
|
|
||||||
const auth = this._auth
|
const auth = this._auth
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user