fix: handle disconnect as connect failure
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
5ea7cd17d8
commit
d8e0c935b9
@ -152,7 +152,7 @@ export class Connection extends EventEmitter<ConnectionTypeEvents> implements Co
|
|||||||
if (awaitOpen) {
|
if (awaitOpen) {
|
||||||
await new Promise((resolve, reject) => {
|
await new Promise((resolve, reject) => {
|
||||||
this.once("connected", resolve);
|
this.once("connected", resolve);
|
||||||
this.once("error", reject);
|
this.once("disconnect", reject);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user