You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OSCDestination: a slow lookup finishing after a newer connect takes the destination back #135
Found in the pre-merge review of #129 (#84, #109). OSCDestination.connect installs whatever it opens, whenever its lookup finishes. A slow name lookup that finishes after a newer connect takes the destination back to the old host. This can happen with:
launch's connectOSC and an Apply
Apply and reresolve() after a failing send or a wake
A probe on the #129 branch reproduces it: connect old-studio.local (lookup held), connect 192.168.1.20 (succeeds), release the lookup, then send. The message goes to 10.0.0.9, the old host, not to 192.168.1.20.
The app has the same race. connectOSC's failure branch sets status.problem (oscSender) when the launch lookup times out, even if an Apply has since opened a working host.
Fix
Give each connect a generation (or compare against state.target under the lock). Only the latest one may install its sink and report lastError or onReady. An older one returns its result without touching the state. The app ignores a stale connectOSC result in the same way.
Acceptance criteria
A connect that finishes after a newer one changes nothing: sends go to the newer host, and lastError and onReady are the newer one's.
reresolve() started before an Apply doesn't undo it.
Test-first with /tdd at the OSCDestination seam, with a gated fake resolver.
Activity