diff --git a/src/socket.io/index.js b/src/socket.io/index.js index c128cc414c..80fe78271a 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -76,6 +76,7 @@ Sockets.init = async function (server) { function onConnection(socket) { socket.uid = socket.request.uid; + socket.data.uid = socket.uid; // socket.data is shared between nodes via fetchSockets socket.ip = ( socket.request.headers['x-forwarded-for'] || socket.request.connection.remoteAddress || ''