Esempio n. 1
0
 public void StopListeners()
 {
     if (_tokenSource == null)
     {
         return;
     }
     Core.Log.InfoBasic("Stopping queue server listeners for {0}", Name);
     _tokenSource.Cancel();
     Task.WaitAll(_listenerTasks.ToArray());
     _listenerTasks.Clear();
     QueueServerListeners.Each(l => l.Dispose());
     QueueServerListeners.Clear();
     _tokenSource = null;
     Core.Log.InfoBasic("Queue server listeners for {0} stopped", Name);
 }
Esempio n. 2
0
 public void StopListeners()
 {
     if (_tokenSource == null)
     {
         return;
     }
     Core.Log.InfoBasic("Stopping queue server listeners for {0}", Name);
     _tokenSource.Cancel();
     Task.WaitAll(_listenerTasks.ToArray(), Config.RequestOptions.ServerReceiverOptions.ProcessingWaitOnFinalizeInSec);
     _listenerTasks.Clear();
     QueueServerListeners.Each(l => l.Dispose());
     QueueServerListeners.Clear();
     _tokenSource = null;
     Core.Log.InfoBasic("Queue server listeners for {0} stopped", Name);
 }