one-d-wide / yggdrasil-jumper

Reduce latency of a connection over yggdrasil network
GNU General Public License v3.0
27 stars 4 forks source link

Reconnect when restarting Yggdrasil #2

Open EugeneMartein opened 2 weeks ago

EugeneMartein commented 2 weeks ago

Please make it so that yggdrasil-jumper does not terminate if yggdrasil has been restarted, but instead waits for the admin socket to appear and reconnects. Sorry for my English.

one-d-wide commented 2 weeks ago

Can you explain why you think that the proposed behavior is better or why does it makes sense in your setup?

The current behavior of the jumper aims to make it pretty easy to reason about: it's probably fine if it still running, and it stops when it can no longer work.

The Yggdrasil router is well suited to act as a long-running daemon, so there is usually no need to stop and restart it. But if you still want to, you can just manage the jumper accordingly. For example, if you're using Systemd, try adding WantedBy, After and BindsTo directives, each listing yggdrasil.service (see systemd.unit man page), to the jumper service in order to automatically stop and restart it, after the main yggdrasil service was abruptly restarted.