# Change the amount of time before TCP node throws error

**URL:** <https://discourse.nodered.org/t/change-the-amount-of-time-before-tcp-node-throws-error/13729>\
**Category:** General\
**Created:** [26 July 2019 18:29 UTC](https://discourse.nodered.org/t/change-the-amount-of-time-before-tcp-node-throws-error/13729 "2019-07-26T18:29:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jovee](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@jovee](https://discourse.nodered.org/u/jovee)\
**Post date:** [26 July 2019 18:29 UTC](https://discourse.nodered.org/t/change-the-amount-of-time-before-tcp-node-throws-error/13729/1 "2019-07-26T18:29:50Z")

</div>

Hi! Waiting for a TCP request node to throw a "connect failed" error is part of my flow, but it takes around 1min 15sec. I know that if there's no connect in the first 15 seconds of attempting, there's not going to be any point in waiting around, the connection won't happen.

Does anyone know of a way to specify the amount of time the TCP request node waits around before it throws an error?

Thanks!

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [26 July 2019 23:29 UTC](https://discourse.nodered.org/t/change-the-amount-of-time-before-tcp-node-throws-error/13729/2 "2019-07-26T23:29:55Z")

</div>

in `settings.js`

```auto
  // Timeout in milliseconds for TCP server socket connections
    // defaults to no timeout
    //socketTimeout: 120000,

```

uncomment `socketTimeout` with your own value and restart node-red.

---

<div class="post-metadata">

**Author:** ![jovee](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@jovee](https://discourse.nodered.org/u/jovee)\
**Post date:** [27 July 2019 01:30 UTC](https://discourse.nodered.org/t/change-the-amount-of-time-before-tcp-node-throws-error/13729/3 "2019-07-27T01:30:29Z")

</div>

Thanks so much!
