NServiceBus.TransportReceiver.Stop C# (CSharp) Method

Stop() public method

public Stop ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task
        public async Task Stop()
        {
            if (!isStarted)
            {
                return;
            }

            try
            {
                await receiver.Stop().ConfigureAwait(false);
            }
            catch (Exception exception)
            {
                Logger.Warn($"Receiver {Id} listening to queue {pushSettings.InputQueue} threw an exception on stopping.", exception);
            }
            finally
            {
                isStarted = false;
            }
        }