summary refs log tree commit diff
path: root/gateway/src/events
diff options
context:
space:
mode:
Diffstat (limited to 'gateway/src/events')
-rw-r--r--gateway/src/events/Close.ts4
-rw-r--r--gateway/src/events/Connection.ts6
2 files changed, 5 insertions, 5 deletions
diff --git a/gateway/src/events/Close.ts b/gateway/src/events/Close.ts

index 26f4e7df..d68fc751 100644 --- a/gateway/src/events/Close.ts +++ b/gateway/src/events/Close.ts
@@ -1,9 +1,9 @@ import WebSocket from "../util/WebSocket"; import { Message } from "./Message"; -import {Session} from "@fosscord/util"; +import { Session } from "@fosscord/util"; export async function Close(this: WebSocket, code: number, reason: string) { - await Session.delete({session_id: this.session_id}) + await Session.delete({ session_id: this.session_id }); // @ts-ignore this.off("message", Message); } diff --git a/gateway/src/events/Connection.ts b/gateway/src/events/Connection.ts
index 1af484eb..b3c94eaf 100644 --- a/gateway/src/events/Connection.ts +++ b/gateway/src/events/Connection.ts
@@ -7,7 +7,7 @@ import { Send } from "../util/Send"; import { CLOSECODES, OPCODES } from "../util/Constants"; import { createDeflate } from "zlib"; import { URL } from "url"; -import {Session} from "@fosscord/util"; +import { Session } from "@fosscord/util"; var erlpack: any; try { erlpack = require("erlpack"); @@ -57,12 +57,12 @@ export async function Connection(this: Server, socket: WebSocket, request: Incom }); socket.readyTimeout = setTimeout(() => { - Session.delete({session_id: socket.session_id}) //should we await? + Session.delete({ session_id: socket.session_id }); //should we await? return socket.close(CLOSECODES.Session_timed_out); }, 1000 * 30); } catch (error) { console.error(error); - Session.delete({session_id: socket.session_id}) //should we await? + Session.delete({ session_id: socket.session_id }); //should we await? return socket.close(CLOSECODES.Unknown_error); } }