From 372bfd9beb88269d6578ecf9b478b54ced89bca8 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Fri, 7 May 2021 22:52:40 +0200 Subject: :bug: fix identify schema --- src/util/setHeartbeat.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/setHeartbeat.ts b/src/util/setHeartbeat.ts index a59dd251..9f88b481 100644 --- a/src/util/setHeartbeat.ts +++ b/src/util/setHeartbeat.ts @@ -1,3 +1,4 @@ +import { CLOSECODES } from "./Constants"; import WebSocket from "./WebSocket"; // TODO: make heartbeat timeout configurable @@ -5,6 +6,6 @@ export function setHeartbeat(socket: WebSocket) { if (socket.heartbeatTimeout) clearTimeout(socket.heartbeatTimeout); socket.heartbeatTimeout = setTimeout(() => { - return socket.close(4009); + return socket.close(CLOSECODES.Session_timed_out); }, 1000 * 45); } -- cgit 1.5.1