mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix corruption of websocket _session
This commit is contained in:
parent
fde157ff50
commit
c6a1c8e8c4
4
packages/node_modules/@node-red/nodes/core/io/22-websocket.js
generated
vendored
4
packages/node_modules/@node-red/nodes/core/io/22-websocket.js
generated
vendored
@ -250,10 +250,10 @@ module.exports = function(RED) {
|
||||
this.on("input", function(msg) {
|
||||
var payload;
|
||||
if (this.serverConfig.wholemsg) {
|
||||
var sess = ""+msg._session;
|
||||
var sess = JSON.stringify(msg._session);
|
||||
delete msg._session;
|
||||
payload = JSON.stringify(msg);
|
||||
msg._session = sess;
|
||||
msg._session = JSON.parse(sess);
|
||||
}
|
||||
else if (msg.hasOwnProperty("payload")) {
|
||||
if (!Buffer.isBuffer(msg.payload)) { // if it's not a buffer make sure it's a string.
|
||||
|
Loading…
Reference in New Issue
Block a user