fix: handle disconnect as connect failure
This commit is contained in:
@ -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) {
|
||||||
|
Reference in New Issue
Block a user