fix(dcl): async OPC UA endpoint discovery bounded by OperationTimeoutMs/verify budget; adapter connect never runs on the actor thread (review 2026-10-21 02/P2)
This commit is contained in:
@@ -957,7 +957,14 @@ public class DataConnectionActor : UntypedActor, IWithTimers
|
||||
// is still in flight swaps the adapter and bumps the counter, and the OUTGOING
|
||||
// adapter's answer must never be applied to its replacement.
|
||||
var generation = _adapterGeneration;
|
||||
_adapter.ConnectAsync(_connectionDetails).ContinueWith(t =>
|
||||
// Started on the thread pool, never inline: everything an adapter's ConnectAsync does
|
||||
// before its first YIELDING await would otherwise run on this actor's dispatcher thread
|
||||
// — OPC UA endpoint discovery was synchronous there and parked the thread for the SDK's
|
||||
// operation timeout on every reconnect tick to a black-holed endpoint (review 2026-10-21
|
||||
// 02/P2). Adapter and details are captured here, on the actor thread.
|
||||
var adapter = _adapter;
|
||||
var details = _connectionDetails;
|
||||
Task.Run(() => adapter.ConnectAsync(details)).ContinueWith(t =>
|
||||
{
|
||||
if (t.IsCompletedSuccessfully)
|
||||
return new ConnectResult(true, null, generation);
|
||||
|
||||
Reference in New Issue
Block a user