From 3262ff1cb912bc2083e6b5fa13d482e36031beed Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Wed, 2 Sep 2020 20:32:54 -0400 Subject: [PATCH] PadMessageHandler: Rename createSessionInfo to createSessionInfoAuth The function doesn't create the session info -- it creates the auth property of existing session info. --- src/node/handler/PadMessageHandler.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/node/handler/PadMessageHandler.js b/src/node/handler/PadMessageHandler.js index 9eb9c7ba8..ed1c970d6 100644 --- a/src/node/handler/PadMessageHandler.js +++ b/src/node/handler/PadMessageHandler.js @@ -264,7 +264,7 @@ exports.handleMessage = async function(client, message) if (message.type === "CLIENT_READY") { // client tried to auth for the first time (first msg from the client) - createSessionInfo(client, message); + createSessionInfoAuth(client, message); } // the session may have been dropped during earlier processing @@ -839,11 +839,13 @@ function handleSwitchToPad(client, message) }); // start up the new pad - createSessionInfo(client, message); + createSessionInfoAuth(client, message); handleClientReady(client, message); } -function createSessionInfo(client, message) +// Creates/replaces the auth object in the client's session info. Session info for the client must +// already exist. +function createSessionInfoAuth(client, message) { // Remember this information since we won't // have the cookie in further socket.io messages.