mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
PadMessageHandler: Don't fire userLeave
if user hasn't joined yet
This commit is contained in:
parent
87a490d456
commit
caefd2184a
1 changed files with 2 additions and 1 deletions
|
@ -131,7 +131,8 @@ exports.handleDisconnect = async (socket) => {
|
|||
stats.meter('disconnects').mark();
|
||||
const session = sessioninfos[socket.id];
|
||||
delete sessioninfos[socket.id];
|
||||
if (!session || !session.author) return;
|
||||
// session.padId can be nullish if the user disconnects before sending CLIENT_READY.
|
||||
if (!session || !session.author || !session.padId) return;
|
||||
const {session: {user} = {}} = socket.client.request;
|
||||
/* eslint-disable prefer-template -- it doesn't support breaking across multiple lines */
|
||||
accessLogger.info('[LEAVE]' +
|
||||
|
|
Loading…
Reference in a new issue