Presumably you are calling the "close" method when you want to end? If you are just killing the shell then you need to trap that and close the connection gracefully - but preferably have a cleaner way of terminating.
[
https://www.netcracker.com/assets/img/netcracker-social-final.png] ƕ
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Tim Fathers
Sent: 15 March 2017 09:34
To: web400@xxxxxxxxxxxx
Subject: [WEB400] Fw: NodeJs hung ports
Hi all,
I'm trying to create a simple reverse proxy to front our application servers using this
https://www.npmjs.com/package/http-proxy but I'm finding that after I execute it through the QP2TERM shell the port number is still in use after the shell session ends. Netstat shows no jobs or tasks associated with the port, but it does show my user profile as being the associated user. Is there a) a way to prevent this happening, b) a way to forcibly free the ports that appear to be hung?
Many thanksm
Tim.
[
https://www.npmjs.com/static/images/touch-icons/open-graph.png]<
https://www.npmjs.com/package/http-proxy>
http-proxy - npm<
https://www.npmjs.com/package/http-proxy>
www.npmjs.com
node-http-proxy node-http-proxy is an HTTP programmable proxying library that supports websockets. It is suitable for implementing components such as reverse proxies ...
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
________________________________
The information transmitted herein is intended only for the person or entity to which it is addressed and may contain confidential, proprietary and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
As an Amazon Associate we earn from qualifying purchases.