From f44f5d7ac2d24ff836c2e1d4b2fa58da04b13052 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sun, 25 Sep 2022 18:24:21 +1000 Subject: Refactor to mono-repo + upgrade packages --- 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