public void Handle(CompletionTimeout message) { if (Interlocked.Read(ref _state) == PendingResponse) { if (_tcs.TrySetException(new CommandTimedOutException(" timed out waiting for handler to complete.", _command))) { if (Log.LogLevel >= LogLevel.Error) { Log.Error(_command.GetType().Name + " command timed out"); } _cancelAction(); } } }
public void Handle(CompletionTimeout message) { _pendingCommands.TryGetValue(message.CommandId, out var tracker); tracker?.Handle(message); }