1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 10:22:39 +01:00

Fix a bug prevent connections using erlpack (#977)

This commit is contained in:
Madeline 2023-02-16 19:31:36 +11:00 committed by GitHub
parent 76c85f7181
commit 3c11ffe17a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;