fix(review): resolve deferred code-review findings; S7.Cli verdict, browser CP release, MemberLeft/Exited/Downed, Sql Detach hoist (#625)
Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
+25
-5
@@ -104,11 +104,31 @@ internal sealed class OpcUaClientBrowseSession : IBrowseSession
|
||||
var cp = result.ContinuationPoint;
|
||||
while (cp is { Length: > 0 })
|
||||
{
|
||||
var next = await _session.BrowseNextAsync(
|
||||
requestHeader: null,
|
||||
releaseContinuationPoints: false,
|
||||
continuationPoints: [cp],
|
||||
ct: ct).ConfigureAwait(false);
|
||||
BrowseNextResponse next;
|
||||
try
|
||||
{
|
||||
next = await _session.BrowseNextAsync(
|
||||
requestHeader: null,
|
||||
releaseContinuationPoints: false,
|
||||
continuationPoints: [cp],
|
||||
ct: ct).ConfigureAwait(false);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// Caller cancelled mid-pagination (Driver.OpcUaClient.Browser-002): release the
|
||||
// server-side cursor on a fresh token (the original is already cancelled).
|
||||
// Best-effort — mirrors OpcUaClientDriver's pagination loop.
|
||||
try
|
||||
{
|
||||
await _session.BrowseNextAsync(
|
||||
requestHeader: null,
|
||||
releaseContinuationPoints: true,
|
||||
continuationPoints: [cp],
|
||||
ct: CancellationToken.None).ConfigureAwait(false);
|
||||
}
|
||||
catch { /* best-effort — server may have already cleaned up */ }
|
||||
throw;
|
||||
}
|
||||
|
||||
if (next.Results.Count == 0) break;
|
||||
var nextResult = next.Results[0];
|
||||
|
||||
Reference in New Issue
Block a user