From e3cec1a194c3a216dd8c52de21c3f47b1d53656e Mon Sep 17 00:00:00 2001 From: raphael Date: Sat, 9 May 2020 15:06:21 +0200 Subject: [PATCH] remove volatile because problems even on local connections (not drawn lines) --- scripts/server-backend.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/server-backend.js b/scripts/server-backend.js index ce2ad14..1877d27 100644 --- a/scripts/server-backend.js +++ b/scripts/server-backend.js @@ -202,14 +202,14 @@ function startBackendServer(port) { if (smallestScreenResolutions && smallestScreenResolutions[whiteboardId] && socket && socket.id) { delete smallestScreenResolutions[whiteboardId][socket.id]; } - socket.compress(false).volatile.broadcast.emit('refreshUserBadges', null); //Removes old user Badges + socket.compress(false).broadcast.emit('refreshUserBadges', null); //Removes old user Badges sendSmallestScreenResolution(); }); socket.on('drawToWhiteboard', function (content) { content = escapeAllContentStrings(content); if (accessToken === "" || accessToken == content["at"]) { - socket.compress(false).volatile.broadcast.to(whiteboardId).emit('drawToWhiteboard', content); //Send to all users in the room (not own socket) + socket.compress(false).broadcast.to(whiteboardId).emit('drawToWhiteboard', content); //Send to all users in the room (not own socket) s_whiteboard.handleEventsAndData(content); //save whiteboardchanges on the server } else { socket.emit('wrongAccessToken', true);