increase
This commit is contained in:
parent
0c34cd0fab
commit
deb31424e8
1 changed files with 2 additions and 4 deletions
|
@ -413,19 +413,17 @@ websocketServer.on("connection", (socket) => {
|
||||||
const reader = createReader(Endian.LE, data as Buffer);
|
const reader = createReader(Endian.LE, data as Buffer);
|
||||||
// There is absolutely no reason we should ever get
|
// There is absolutely no reason we should ever get
|
||||||
// more than 50 bytes legit.
|
// more than 50 bytes legit.
|
||||||
if (reader.length > 0 && reader.length < 50) {
|
if (reader.length > 0 && reader.length < 1024) {
|
||||||
switch (reader.readUByte()) {
|
switch (reader.readByte()) {
|
||||||
case MessageType.ClientDetails:
|
case MessageType.ClientDetails:
|
||||||
{
|
{
|
||||||
if (user !== undefined) {
|
if (user !== undefined) {
|
||||||
Console.printInfo("Tried to ClientDetails when already connected and ready!");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const apiKey = reader.readShortString();
|
const apiKey = reader.readShortString();
|
||||||
const rawURL = reader.readString();
|
const rawURL = reader.readString();
|
||||||
const dbUser = await UserService.GetUserByAPIKey(apiKey);
|
const dbUser = await UserService.GetUserByAPIKey(apiKey);
|
||||||
if (dbUser == null) {
|
if (dbUser == null) {
|
||||||
Console.printInfo("User for apiKey " + apiKey + " was null!");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const dbUserParty = await UserService.GetActiveParty(dbUser.Id);
|
const dbUserParty = await UserService.GetActiveParty(dbUser.Id);
|
||||||
|
|
Loading…
Reference in a new issue