mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
Fixing a bug that happens when a socket.io connection closes very early after a CLIENT_READY message
This commit is contained in:
parent
e0cf6098fb
commit
0f559347ee
1 changed files with 9 additions and 4 deletions
|
@ -809,9 +809,14 @@ function handleClientReady(client, message)
|
||||||
//Send the clientVars to the Client
|
//Send the clientVars to the Client
|
||||||
client.json.send(clientVars);
|
client.json.send(clientVars);
|
||||||
|
|
||||||
//Save the revision and the author id in sessioninfos
|
//sometimes the client disconnects very early and the session of it is already removed
|
||||||
sessioninfos[client.id].rev = pad.getHeadRevisionNumber();
|
//thats why we have to check that case
|
||||||
sessioninfos[client.id].author = author;
|
if(sessioninfos[client.id] !== undefined)
|
||||||
|
{
|
||||||
|
//Save the revision and the author id in sessioninfos
|
||||||
|
sessioninfos[client.id].rev = pad.getHeadRevisionNumber();
|
||||||
|
sessioninfos[client.id].author = author;
|
||||||
|
}
|
||||||
|
|
||||||
//prepare the notification for the other users on the pad, that this user joined
|
//prepare the notification for the other users on the pad, that this user joined
|
||||||
var messageToTheOtherUsers = {
|
var messageToTheOtherUsers = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue