PadMessageHandler: Fix `USER_CHANGES` queue identifier

`message.padId` is normally undefined for `USER_CHANGES` messages.
pull/5429/head
Richard Hansen 2022-02-23 01:36:48 -05:00
parent c59cbb537a
commit bdbde88fed
2 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,13 @@
(not yet released)
### Notable enhancements and fixes
* Fixed a bug that caused all pad edit messages received at the server to go
through a single queue. Now there is a separate queue per pad as intended,
which should reduce message processing latency when many pads are active at
the same time.
# 1.8.16
### Security fixes

View File

@ -296,7 +296,7 @@ exports.handleMessage = async (socket, message) => {
messageLogger.warn('Dropped message, COLLABROOM for readonly pad');
} else if (message.data.type === 'USER_CHANGES') {
stats.counter('pendingEdits').inc();
await padChannels.enqueue(message.padId, {socket, message});
await padChannels.enqueue(thisSession.padId, {socket, message});
} else if (message.data.type === 'USERINFO_UPDATE') {
await handleUserInfoUpdate(socket, message);
} else if (message.data.type === 'CHAT_MESSAGE') {