From 5e86d7ab9c5200d794c3adb2b422d20a2aefd2ce Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 13 Aug 2022 02:00:50 +0200 Subject: restructure to single project --- gateway/src/util/Heartbeat.ts | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 gateway/src/util/Heartbeat.ts (limited to 'gateway/src/util/Heartbeat.ts') diff --git a/gateway/src/util/Heartbeat.ts b/gateway/src/util/Heartbeat.ts deleted file mode 100644 index f6871cfe..00000000 --- a/gateway/src/util/Heartbeat.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { CLOSECODES } from "./Constants"; -import { WebSocket } from "./WebSocket"; - -// TODO: make heartbeat timeout configurable -export function setHeartbeat(socket: WebSocket) { - if (socket.heartbeatTimeout) clearTimeout(socket.heartbeatTimeout); - - socket.heartbeatTimeout = setTimeout(() => { - return socket.close(CLOSECODES.Session_timed_out); - }, 1000 * 45); -} -- cgit 1.5.1