mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Fix restart publication races (#3186)
Prepare offline routing before restart requests become observable, reject stale route owners, and wait for source-client cleanup before executing automatic retries. Add deterministic publication-order, cleanup-gate, and stale-route regression tests.
This commit is contained in:
parent
456a548cbc
commit
5655e3fc89
7 changed files with 164 additions and 25 deletions
|
|
@ -47,13 +47,13 @@ namespace MinecraftClient
|
|||
}
|
||||
}
|
||||
|
||||
internal bool TryActivate(long connectionAttempt, Action activate)
|
||||
internal bool TryActivate(long connectionAttempt, long currentConnectionAttempt, Action activate)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(activate);
|
||||
|
||||
lock (stateLock)
|
||||
{
|
||||
if (ownerAttempt >= connectionAttempt)
|
||||
if (connectionAttempt < currentConnectionAttempt || ownerAttempt >= connectionAttempt)
|
||||
return false;
|
||||
|
||||
ownerAttempt = connectionAttempt;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue