mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
fix crash if disconnect happens for sessions that have messages queued
This commit is contained in:
parent
ca8dce1840
commit
c8c2866087
1 changed files with 8 additions and 0 deletions
|
@ -588,6 +588,14 @@ function handleUserChanges(data, cb)
|
||||||
messageLogger.warn("Dropped message, USER_CHANGES Message has no changeset!");
|
messageLogger.warn("Dropped message, USER_CHANGES Message has no changeset!");
|
||||||
return cb();
|
return cb();
|
||||||
}
|
}
|
||||||
|
//TODO: this might happen with other messages too => find one place to copy the session
|
||||||
|
//and always use the copy. atm a message will be ignored if the session is gone even
|
||||||
|
//if the session was valid when the message arrived in the first place
|
||||||
|
if(!sessioninfos[client.id])
|
||||||
|
{
|
||||||
|
messageLogger.warn("Dropped message, disconnect happened in the mean time");
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
|
|
||||||
//get all Vars we need
|
//get all Vars we need
|
||||||
var baseRev = message.data.baseRev;
|
var baseRev = message.data.baseRev;
|
||||||
|
|
Loading…
Reference in a new issue