Contour.Transport.RabbitMQ.Internal.RabbitBus.Stop C# (CSharp) Method

Stop() public method

public Stop ( ) : void
return void
        public override void Stop()
        {
            this.ResetRestartTask();

            var token = this.cancellationTokenSource.Token;
            this.restartTask = Task.Factory.StartNew(() => this.StopTask(token), token, TaskCreationOptions.LongRunning, TaskScheduler.Default);

            this.restartTask.Wait(5000);
        }