From c59af8156300c9717a079a4896fe8e9a4f8f4e18 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') 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