mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-25 11:43:07 +01:00
Add comment for 123 magic number
This commit is contained in:
parent
1e2e82d975
commit
15090143d0
@ -16,7 +16,7 @@ export async function Message(this: WebSocket, buffer: WS.Data) {
|
||||
// TODO: compression
|
||||
var data: Payload;
|
||||
|
||||
if ((buffer instanceof Buffer && buffer[0] === 123) ||
|
||||
if ((buffer instanceof Buffer && buffer[0] === 123) || // ASCII 123 = `{`. Bad check for JSON
|
||||
(typeof buffer === "string")) {
|
||||
data = bigIntJson.parse(buffer.toString());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user