Exemple #1
0
        public void Dispose()
        {
            shouldContinue = false;
            logger.DebugFormat("Stopping transport for {0}", endpoint);

            while (currentlyProccessingCount > 0)
            {
                Thread.Sleep(TimeSpan.FromSeconds(1));
            }

            if (timeout != null)
            {
                timeout.Dispose();
            }
            DisposeQueueManager();

            if (!haveStarted)
            {
                return;
            }
            foreach (var thread in threads)
            {
                thread.Join();
            }
        }
        public void Dispose()
        {
            shouldContinue = false;
            logger.DebugFormat("Stopping transport for {0}", endpoint);

            if (timeout != null)
            {
                timeout.Dispose();
            }
            DisposeQueueManager();

            if (!haveStarted)
            {
                return;
            }

            foreach (var thread in threads)
            {
                thread.Join();
            }
        }