From 3c11ffe17a45b4f6a9e1cb500fe22e26bc764f4b Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Thu, 16 Feb 2023 19:31:36 +1100 Subject: Fix a bug prevent connections using erlpack (#977) --- src/gateway/events/Connection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gateway/events/Connection.ts') diff --git a/src/gateway/events/Connection.ts b/src/gateway/events/Connection.ts index 5ba68ef7..1c902de0 100644 --- a/src/gateway/events/Connection.ts +++ b/src/gateway/events/Connection.ts @@ -88,7 +88,7 @@ export async function Connection( if (!["json", "etf"].includes(socket.encoding)) return socket.close(CLOSECODES.Decode_error); - if (socket.encoding === "etf" && erlpack) + if (socket.encoding === "etf" && !erlpack) throw new Error("Erlpack is not installed: 'npm i erlpack'"); socket.version = Number(searchParams.get("version")) || 8; -- cgit 1.4.1