Skip to content

Commit

Permalink
fix: exception not bubbling up
Browse files Browse the repository at this point in the history
  • Loading branch information
xhayper committed May 25, 2023
1 parent 2d23100 commit 7a2a009
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
12 changes: 6 additions & 6 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export { grantOrThrow } from "https://deno.land/std@0.182.0/permissions/mod.ts";
export { EventEmitter } from "https://deno.land/std@0.182.0/node/events.ts"; // TODO: Stop using node!
export { Buffer } from "https://deno.land/std@0.182.0/node/buffer.ts"; // TODO: Stop using node!
export { grantOrThrow } from "https://deno.land/std@0.189.0/permissions/mod.ts";
export { EventEmitter } from "https://deno.land/std@0.189.0/node/events.ts"; // TODO: Stop using node!
export { Buffer } from "https://deno.land/std@0.189.0/node/buffer.ts"; // TODO: Stop using node!

export * as path from "https://deno.land/std@0.182.0/path/mod.ts";
export * as net from "https://deno.land/std@0.182.0/node/net.ts"; // TODO: Stop using node!
export * as path from "https://deno.land/std@0.189.0/path/mod.ts";
export * as net from "https://deno.land/std@0.189.0/node/net.ts"; // TODO: Stop using node!

export type {
ActivityType,
Expand All @@ -19,4 +19,4 @@ export type {
PresenceUpdateStatus,
UserFlags,
UserPremiumType,
} from "https://deno.land/x/discord_api_types@0.37.37/v10.ts";
} from "https://deno.land/x/discord_api_types@0.37.42/v10.ts";
2 changes: 1 addition & 1 deletion src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ export class Client
resolve();
});

this.transport.connect();
this.transport.connect().catch(reject);
});

return this.connectionPromise;
Expand Down
4 changes: 1 addition & 3 deletions src/transport/IPC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,7 @@ export class IPCTransport extends Transport {

async connect(): Promise<void> {
if (!this.socket) {
this.socket = await this.getSocket().catch((err) => {
throw err;
});
this.socket = await this.getSocket();
}

this.emit("open");
Expand Down

0 comments on commit 7a2a009

Please sign in to comment.