moby / vpnkit

A toolkit for embedding VPN capabilities in your application
Apache License 2.0
1.09k stars 182 forks source link

vpnkit-forwarder: avoid -data-connect spinning #563

Closed djs55 closed 2 years ago

djs55 commented 2 years ago

Previously if -data-connect was connecting to a port forward and the remote isn't running, it would connect but then get an immediate EOF. Unfortunately it would try again and spin in a tight loop. This is likely to happen when shutting down, as the remote can stop before the port forward closes.

This patch adds a one second delay to break the spinning and a log every 30s to highlight any persistent problem.