This commit is contained in:
Letter N
2020-07-21 17:47:43 +08:00
parent 9fa060de9e
commit d64c240da3
5 changed files with 154 additions and 12 deletions
+2 -2
View File
@@ -98,8 +98,8 @@ const sendRawMessage = msg => {
socket.send(json);
}
else {
// Keep only 10 latest messages in the queue
if (queue.length > 10) {
// Keep only 100 latest messages in the queue
if (queue.length > 100) {
queue.shift();
}
queue.push(json);