local-ssl-proxy icon indicating copy to clipboard operation
local-ssl-proxy copied to clipboard

ECONNREFUSED after target system is shut down and restarted

Open timtucker-dte opened this issue 2 years ago • 1 comments

I use this for local development with Azure Functions and have noticed that increasingly the proxy is unable to reconnect after the target server is shut down and restarted.

Sequence:

  • Start app server
  • Start proxy server
  • Stop app server
  • Make connection - connection fails with ECONNREFUSED (expected)
  • Restart app server - connection still fails with ECONNREFUSED (not expected)
  • Restart proxy server - connection is successful

Possibly related to #108 or #98

Currently using 2.0.5 + Node 18

timtucker-dte avatar Mar 04 '24 11:03 timtucker-dte

Looking at code a bit more and it seems like it would be pretty trivial to have the on error handler restart the proxy whenever ECONNRESET or ECONNREFUSED is received.

timtucker-dte avatar Aug 13 '24 13:08 timtucker-dte