# How can I close persistent http connections?

**URL:** <https://discourse.nodered.org/t/how-can-i-close-persistent-http-connections/56541>\
**Category:** General\
**Tags:** http-request\
**Created:** [12 January 2022 15:37 UTC](https://discourse.nodered.org/t/how-can-i-close-persistent-http-connections/56541 "2022-01-12T15:37:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![the-greenman](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/the-greenman/32/54069_2.png) [@the-greenman](https://discourse.nodered.org/u/the-greenman)\
**Post date:** [12 January 2022 15:37 UTC](https://discourse.nodered.org/t/how-can-i-close-persistent-http-connections/56541/1 "2022-01-12T15:37:24Z")

</div>

**Is there a way to close persistent http-request connections?**

I am building a node-red interface for Twitter's streaming API. This requires that I open a persistent streaming connection to an API endpoint.

I've got no trouble opening the connection....but have not worked out how to close them. I can restart node-red, but.. that's not ideal.

Deploying an update to a flow does not seem to disconnect anything, at the moment it's just creating a new connection and leaving the old one in place.

Any suggestions?

Thank you

---

<div class="post-metadata">

**Author:** ![the-greenman](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/the-greenman/32/54069_2.png) [@the-greenman](https://discourse.nodered.org/u/the-greenman)\
**Post date:** [12 January 2022 17:04 UTC](https://discourse.nodered.org/t/how-can-i-close-persistent-http-connections/56541/2 "2022-01-12T17:04:41Z")

</div>

I've found the issue.

The Stream is Chunked, but has no end. I need each of the chunks in realtime.

> [@Http request (open connection)](https://discourse.nodered.org/t/http-request-open-connection/32459):
>
> Hi I really need some help with this one. I have a security system I want to do a http request to. It's some kind of a connection that stays open and update the events if I use for example chrome. It's an xml document. I have tried the regular http request node but it does not connect at all. I tried the multipart decoder and it succseeded to get the latest event and then the the node says (no multipart url) and it don't get any more updates if I don't inject it again. Hope you understand what I…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 March 2022 17:04 UTC](https://discourse.nodered.org/t/how-can-i-close-persistent-http-connections/56541/3 "2022-03-13T17:04:52Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
