summary refs log tree commit diff
path: root/gateway/src/opcodes/Identify.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-08-22 15:33:06 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-08-22 15:33:06 +1000
commitee98101e4c463910e1ca6dd099de13395cd9fa57 (patch)
tree318eda6258ee651a587accf1c440960269550382 /gateway/src/opcodes/Identify.ts
parentPrevent lazyrequest when sent with guild_id as number (diff)
downloadserver-ts-ee98101e4c463910e1ca6dd099de13395cd9fa57.tar.xz
LazyRequest on mobile + socket not closed fixes
Diffstat (limited to 'gateway/src/opcodes/Identify.ts')
-rw-r--r--gateway/src/opcodes/Identify.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/gateway/src/opcodes/Identify.ts b/gateway/src/opcodes/Identify.ts

index 041512c5..57c45d1f 100644 --- a/gateway/src/opcodes/Identify.ts +++ b/gateway/src/opcodes/Identify.ts
@@ -137,12 +137,13 @@ export async function onIdentify(this: WebSocket, data: Payload) { guilds = guilds.map((guild) => { if (user.bot) { setTimeout(() => { - Send(this, { + var promise = Send(this, { op: OPCODES.Dispatch, t: EVENTEnum.GuildCreate, s: this.sequence++, d: guild, }); + if (promise) promise.catch(console.error); }, 500); return { id: guild.id, unavailable: true }; }