fix(m9/T24b): try/finally around _busy in move dialog (circuit-teardown lock)
This commit is contained in:
+15
-9
@@ -88,18 +88,24 @@
|
|||||||
|
|
||||||
_busy = true;
|
_busy = true;
|
||||||
_error = null;
|
_error = null;
|
||||||
var result = await MoveService.MoveAsync(ConnectionId, target);
|
try
|
||||||
_busy = false;
|
{
|
||||||
|
var result = await MoveService.MoveAsync(ConnectionId, target);
|
||||||
|
|
||||||
if (result.Success)
|
if (result.Success)
|
||||||
{
|
{
|
||||||
await IsVisibleChanged.InvokeAsync(false);
|
await IsVisibleChanged.InvokeAsync(false);
|
||||||
await OnMoved.InvokeAsync();
|
await OnMoved.InvokeAsync();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Surface the server guard error inline; keep the dialog open.
|
||||||
|
_error = result.Error ?? "Move failed.";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
finally
|
||||||
{
|
{
|
||||||
// Surface the server guard error inline; keep the dialog open.
|
_busy = false;
|
||||||
_error = result.Error ?? "Move failed.";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user