mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
remember user session because it can be gone when finalHandler is called
This commit is contained in:
parent
c8c2866087
commit
fa681d43f7
1 changed files with 3 additions and 2 deletions
|
@ -167,7 +167,8 @@ exports.handleMessage = function(client, message)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!sessioninfos[client.id]) {
|
var thisSession = sessioninfos[client.id]
|
||||||
|
if(!thisSession) {
|
||||||
messageLogger.warn("Dropped message from an unknown connection.")
|
messageLogger.warn("Dropped message from an unknown connection.")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -196,7 +197,7 @@ exports.handleMessage = function(client, message)
|
||||||
} else if(message.type == "CHANGESET_REQ") {
|
} else if(message.type == "CHANGESET_REQ") {
|
||||||
handleChangesetRequest(client, message);
|
handleChangesetRequest(client, message);
|
||||||
} else if(message.type == "COLLABROOM") {
|
} else if(message.type == "COLLABROOM") {
|
||||||
if (sessioninfos[client.id].readonly) {
|
if (thisSession.readonly) {
|
||||||
messageLogger.warn("Dropped message, COLLABROOM for readonly pad");
|
messageLogger.warn("Dropped message, COLLABROOM for readonly pad");
|
||||||
} else if (message.data.type == "USER_CHANGES") {
|
} else if (message.data.type == "USER_CHANGES") {
|
||||||
stats.counter('pendingEdits').inc()
|
stats.counter('pendingEdits').inc()
|
||||||
|
|
Loading…
Reference in a new issue