summary refs log tree commit diff
path: root/src/util/setHeartbeat.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-07 22:52:40 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-07 22:52:40 +0200
commit372bfd9beb88269d6578ecf9b478b54ced89bca8 (patch)
tree1f8cf202b42d5f41ecaa523b8fe9259fed31419c /src/util/setHeartbeat.ts
parent:bug: fix identify (diff)
downloadserver-372bfd9beb88269d6578ecf9b478b54ced89bca8.tar.xz
:bug: fix identify schema
Diffstat (limited to 'src/util/setHeartbeat.ts')
-rw-r--r--src/util/setHeartbeat.ts3
1 files changed, 2 insertions, 1 deletions
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); }