//===================================
    // Stoppable
    //===================================

    public override void Stop()
    {
        _outbound.Leave();
        _cancellable.Cancel();
        _registry.Leave(_node.Id);
        base.Stop();
    }
예제 #2
0
 public void CancelTimer()
 {
     if (cancellable != null)
     {
         cancellable.Cancel();
         cancellable = null;
     }
 }
예제 #3
0
 private void ClearTimer()
 {
     if (cancellable != null)
     {
         cancellable.Cancel();
         cancellable = null;
     }
 }
예제 #4
0
 internal void CancelTimer()
 {
     if (cancellable != null)
     {
         cancellable.Cancel();
         cancellable = null;
     }
 }
예제 #5
0
        public override void Stop()
        {
            if (_cancellable != null)
            {
                _cancellable.Cancel();
            }

            _delegate.Stop();
            base.Stop();
        }
예제 #6
0
        public static bool TryCancel(object target)
        {
            ICancellable cancellable = target as ICancellable;

            if (cancellable != null)
            {
                cancellable.Cancel();
                return(true);
            }
            return(false);
        }
예제 #7
0
        //=========================================
        // Stoppable
        //=========================================

        public override void Stop()
        {
            if (_cancellable != null)
            {
                _cancellable.Cancel();
                _cancellable = null;
            }

            _reader?.Close();

            base.Stop();
        }
    //=========================================
    // Stoppable
    //=========================================

    public override void Stop()
    {
        _cancellable.Cancel();

        foreach (var socketChannelSelectionProcessor in _processors)
        {
            socketChannelSelectionProcessor.Close();
        }

        try
        {
            _channel.Close();
        }
        catch (Exception e)
        {
            Logger.Error($"Failed to close channel for: '{_name}'", e);
        }

        base.Stop();
    }
예제 #9
0
 public override void Stop()
 {
     _cancellable.Cancel();
     _channel.Close();
     base.Stop();
 }
예제 #10
0
 public static bool TryCancel <TTarget>(ICancellable target)
 {
     target.Cancel();
     return(true);
 }