public void Ping() { if (_options.PingTimeout == null) { return; } var cts = new CancellationTokenSource(_options.PingTimeout.Value); cts.Token.Register(PingTimeout, cts); var oldCts = Interlocked.Exchange(ref _cts, cts); oldCts?.Dispose(); }
public void Post() { _lifetimeManager.Ping(); }