private void RaiseHeartbeatFailed()
 {
     _currentConsumerTaskCancellation.Cancel();
     _heartbeatSocket.Close();
     _heartbeatSocket.Dispose();
     _consumerSocket.Close();
     _consumerSocket.Dispose();
 }
Example #2
0
        public void Dispose()
        {
            _cancel.Cancel();

            _heartbeatSocket.Close();
            _heartbeatSocket.Dispose();
        }
        public void Stop()
        {
            _cancel.Cancel();

            _heartbeatSocket.Close();
            _heartbeatSocket.Dispose();

            _publisherSocket.Close();
            _publisherSocket.Dispose();
        }
Example #4
0
        public void Kill()
        {
            _poller.Stop();

            _frontend.Close();
            _frontend.Dispose();

            _backend.Close();
            _backend.Dispose();
        }
Example #5
0
        protected override Task DestroyInternal()
        {
            _cancel.Cancel();

            _poller.Stop();

            _heartbeatSocket.Close();
            _heartbeatSocket.Dispose();

            _stateRequestSocket.Close();
            _stateRequestSocket.Dispose();

            return(Task.CompletedTask);
        }
Example #6
0
        public void Kill()
        {
            _poller.Stop();

            _heartbeat.Close();
            _heartbeat.Dispose();

            _frontend.Close();
            _frontend.Dispose();

            _backend.Close();
            _backend.Dispose();

            _workerQueue.Dispose();
            _workQueue.Dispose();
        }
Example #7
0
        public void Stop()
        {
            _cancel.Cancel();

            _poller.Stop();

            _heartbeat.Close();
            _heartbeat.Dispose();

            _publishStateUpdate.Close();
            _publishStateUpdate.Dispose();

            _subscribeToUpdates.Close();
            _subscribeToUpdates.Dispose();

            _stateRequest.Close();
            _stateRequest.Dispose();
        }
Example #8
0
        public override Task Stop()
        {
            _cancel.Cancel();

            _poller.Stop();

            _heartbeat.Close();
            _heartbeat.Dispose();

            _frontend.Close();
            _frontend.Dispose();

            _backend.Close();
            _backend.Dispose();


            return(Task.CompletedTask);
        }
Example #9
0
        public async Task Stop()
        {
            var peerList = _peerLastContact.Select(x => x.Key).ToList();

            lock (_server)
            {
                foreach (var peerId in peerList)
                {
                    _server
                    .SendMoreFrame(peerId.ToByteArray())
                    .SendMoreFrame(_nodeId.ToByteArray())
                    .SendFrame(ConvertOp(MessageOp.Disconnect));
                }
            }

            _poller.Stop();
            _poller.Remove(_server);
            _poller.Remove(_houseKeeper);
            _houseKeeper.Enable = false;
            _server.Close();
        }
Example #10
0
 public void Stop()
 {
     _proxy.Stop();
     _router?.Close();
     _dealer?.Close();
 }
Example #11
0
 /// <summary>
 /// 停止
 /// </summary>
 public void Stop()
 {
     frontEnd.Close();
     backEnd.Close();
     proxy.Stop();
 }