From 702ce52624112fcde967b52ca185c0e0098f72ee Mon Sep 17 00:00:00 2001 From: stswoon Date: Tue, 12 Sep 2023 18:00:18 +0400 Subject: [PATCH] Add req in ws connection - update stompServer.js --- stompServer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stompServer.js b/stompServer.js index 3454476..46e1f2d 100644 --- a/stompServer.js +++ b/stompServer.js @@ -60,7 +60,8 @@ var StompServer = function (config) { * @type {object} * @property {string} sessionId */ - this.socket.on('connection', function (ws) { + this.socket.on('connection', function (ws, incomingMessage) { + ws.__req = incomingMessage; ws.sessionId = stompUtils.genId(); this.emit('connecting', ws.sessionId);