Why are reconnections after restart preferring Global Discovery over Local Discovery?
Obviously it is much better to connect via the local lan if possible
rather than going up through the internet.
Local discovery is prioritized. However answers may not be available for a while after startup, so global gets there first. We used to have a connection delay for this reason but maybe that got lost over time. Just to confirm - if you pause and resume a device (to force it to be disconnected), I assume it connects via the local address afterwards?
But apologies for a stupid question: this is not something I have done before.
Can I just physically replace the files
/lib/systemd/system/syncthing-resume.service
/lib/systemd/system/syncthing@.service
/usr/bin/syncthing
/usr/lib/systemd/user/syncthing.service
with the files from the relevant .tar.gz?
(for me: syncthing-linux-amd64-v0.13.5+11-ga9680e2.tar.gz).
(I could also install the syncthing_0.13.5+11-ga9680e2_amd64.deb
but that would affect my apt records and I would have to uninstall/reinstall syncthing to go back to using the repos)
A = laptop with test Syncthing v0.13.5+13-g56d1fee
B = laptop with test Syncthing v0.13.5+13-g56d1fee
C = Android with Syncthing v0.13.2
Some notes
Restart of A or B now always uses local discovery between A & B
Restart of A now almost always uses local discovery between A & C
Restart of C uses global discovery, so the timing changes are local to the instance of Syncthing on A, not over the network. I assume this is intended behaviour.
re 3: (but note: sometimes even a cold start of Syncthing v0.13.2 on Android uses global discovery, whereas on Laptops using v0.3.15 cold start always uses local discovery).
Hope this is helpful. Let me know if you need anything further.