From 6e46a532884c5a15ee6e06a6d27b910ce2cad119 Mon Sep 17 00:00:00 2001 From: John McLear Date: Mon, 18 Feb 2013 00:36:31 +0000 Subject: [PATCH] this is probably bad, please sanity check --- src/node/handler/PadMessageHandler.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index f9944ae6c..167cafc78 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -926,10 +926,15 @@ function handleClientReady(client, message) }) //If this is a reconnect, we don't have to send the client the ClientVars again - if(message.reconnect == "not accepting true here makes everything work fine but it also sends whole atext which is bad") + //if(message.reconnect == "not accepting true here makes everything work fine but it also sends whole atext which is bad") + if(message.reconnect == true) { //Save the revision in sessioninfos, we take the revision from the info the client send to us sessioninfos[client.id].rev = message.client_rev; + //Join the pad and start receiving updates + client.join(padIds.padId); + //Save the current revision in sessioninfos, should be the same as in clientVars + sessioninfos[client.id].rev = pad.getHeadRevisionNumber(); // I'm not sure this is a great idea here } //This is a normal first connect else