Skip to content

Commit

Permalink
Fix chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
BlythMeister committed Oct 6, 2024
1 parent b4aec1e commit b4b9af2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/366x366/companion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ function sendAllSettings() {
var chunkCounter = 0;
while(data.length > 0) {
chunkCounter++;
const dataChunk = data.splice(0, Math.min(5, data.lengh));
const dataChunk = data.splice(0, Math.min(10, data.length));
msgq.send(`settingsChunk:${chunkCounter}`, dataChunk, false);
}

Expand Down
4 changes: 4 additions & 0 deletions src/366x366/shared/msgq.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ function CreateUUID() {
//====================================================================================================

function enqueue(messageKey, message, highPriority) {
if(queueHp.length + queueLp.length >= 99) {
throw "Queue too big";
}

const uuid = CreateUUID();
const id = `${messageKey}#${uuid}`;

Expand Down

0 comments on commit b4b9af2

Please sign in to comment.