le13ure on X: after the LAN address of a magpie used as a Remote magpie
provider changed and the user edited it in the provider, requests already
under way kept retrying the old address instead of switching.
Each request held the Provider it started with, and its retries (the
same-one pauses up to 8s, a group's and a provider's patience up to 30s)
asked that copy's address again. The look for a moved magpie
(SeekMoved, v0.1.3177) ran at most once a minute, so other requests
within the minute got nothing from it and kept the stale address. And a
dial to a LAN address no one holds now waited on the OS (~75s macOS,
~127s Linux) per try.
- provider.Readdressed: a Remote magpie copy moved onto the address saved
now. The gateway's try loop asks it before each try; SeekMoved returns
it when another look or the user saved one.
- provider.Edited: store() signals every save; a pause between tries
(pauseAlive, new pauseUntilReaddressed) ends when the waiting Remote
magpie's address changed, so the next try goes at once.
- netproxy: Dispatch's transports give a dial to a private or link-local
IP literal 5s (lanDialCap). Names, public, CGNAT/Tailscale untouched.
- docs: providers-accounts "A remote magpie that moved".
Run (mote, nogui, at this tree): go test ./internal/netproxy
./internal/provider ./internal/gateway -run
'TestLANDial|TestLAN|TestDispatch|TestRemoteMagpie|TestPauseEnds|Patience|Replan'
ok; go vet of the three packages for darwin, linux and windows ok;
gofmt -l clean. mote was at load ~28 over its 18 cores (mica's disk is
full), so timings ran slow.
Broken by hand, each red: lanDialCap off (TestLANDialGivesUp, "no
deadline"); Readdressed out of SeekMoved
(TestRemoteMagpieSavedElsewhereIsTaken); the loop-head Readdressed off
(TestRemoteMagpieRetryGoesToTheSavedAddress, 503 from the old address);
the Edited wake out of pauseUntilReaddressed (TestPauseEndsWhenReaddressed,
the pause ran its full 30s).
Not tried: a real two-computer LAN move; the full suite before the push
(started after it).