# TCP Node replacing complete msg object. Not just payload

**URL:** <https://discourse.nodered.org/t/tcp-node-replacing-complete-msg-object-not-just-payload/2516>\
**Category:** Core Development\
**Created:** [23 August 2018 15:38 UTC](https://discourse.nodered.org/t/tcp-node-replacing-complete-msg-object-not-just-payload/2516 "2018-08-23T15:38:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmorris644](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jmorris644/32/31964_2.png) [@jmorris644](https://discourse.nodered.org/u/jmorris644)\
**Post date:** [23 August 2018 15:38 UTC](https://discourse.nodered.org/t/tcp-node-replacing-complete-msg-object-not-just-payload/2516/1 "2018-08-23T15:38:20Z")

</div>

Since I upgraded to 0.19 I had a new bug that I had to track down.

It seems as if the TCP Request node is now replacing the complete msg object and not just the payload.

I was able to determine this by putting a debug node prior to and immediately after the TCP request node.

I could really use a workaround until this issue gets resolved.

Thanks

Joe

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [23 August 2018 16:40 UTC](https://discourse.nodered.org/t/tcp-node-replacing-complete-msg-object-not-just-payload/2516/2 "2018-08-23T16:40:17Z")

</div>

Could you post an example flow that shows this?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [23 August 2018 16:48 UTC](https://discourse.nodered.org/t/tcp-node-replacing-complete-msg-object-not-just-payload/2516/3 "2018-08-23T16:48:03Z")

</div>

> [@jmorris644](#):
>
> I could really use a workaround until this issue gets resolved.

A quick workaround is to use a change node before the Request node to store the values in flow variables, and a change node after it to restore the values.

---

<div class="post-metadata">

**Author:** ![jmorris644](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jmorris644/32/31964_2.png) [@jmorris644](https://discourse.nodered.org/u/jmorris644)\
**Post date:** [23 August 2018 16:56 UTC](https://discourse.nodered.org/t/tcp-node-replacing-complete-msg-object-not-just-payload/2516/4 "2018-08-23T16:56:24Z")

</div>

I can't provide a flow because the tcp device would not be present and the flow would not work. I did take a snapshot of the flow where you can see the debug nodes prior to and right after the TCP request. And the debug windows showing the results.

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e5752bb6013bc00db96094240a5b98644061c1c4.png)

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [23 August 2018 17:08 UTC](https://discourse.nodered.org/t/tcp-node-replacing-complete-msg-object-not-just-payload/2516/5 "2018-08-23T17:08:48Z")

</div>

For the workaround - what properties that are present before the TCP node do you need to pass on to the flow after the TCP node?

---

<div class="post-metadata">

**Author:** ![jmorris644](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jmorris644/32/31964_2.png) [@jmorris644](https://discourse.nodered.org/u/jmorris644)\
**Post date:** [23 August 2018 17:10 UTC](https://discourse.nodered.org/t/tcp-node-replacing-complete-msg-object-not-just-payload/2516/6 "2018-08-23T17:10:49Z")

</div>

LOL, it looks like it is just the srcnum. Easy. I can make that happen. Thanks for making me take a second look.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [23 August 2018 17:36 UTC](https://discourse.nodered.org/t/tcp-node-replacing-complete-msg-object-not-just-payload/2516/7 "2018-08-23T17:36:49Z")

</div>

This has already been fixed in git thanks to @boneskull and we'll release 0.19.2 tomorrow.

---

<div class="post-metadata">

**Author:** ![jmorris644](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jmorris644/32/31964_2.png) [@jmorris644](https://discourse.nodered.org/u/jmorris644)\
**Post date:** [23 August 2018 17:38 UTC](https://discourse.nodered.org/t/tcp-node-replacing-complete-msg-object-not-just-payload/2516/8 "2018-08-23T17:38:34Z")

</div>

Great!! Thanks!!
