Fix a bug prevent connections using erlpack (#977)
This commit is contained in:
parent
cc50ebf47b
commit
c59af81563
@ -88,7 +88,7 @@ export async function Connection(
|
|||||||
if (!["json", "etf"].includes(socket.encoding))
|
if (!["json", "etf"].includes(socket.encoding))
|
||||||
return socket.close(CLOSECODES.Decode_error);
|
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'");
|
throw new Error("Erlpack is not installed: 'npm i erlpack'");
|
||||||
|
|
||||||
socket.version = Number(searchParams.get("version")) || 8;
|
socket.version = Number(searchParams.get("version")) || 8;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user