public Task StopAsync(CancellationToken cancellationToken)
 {
     UserActivityFileMonitor?.Dispose();
     ProcessScannerTimer?.Stop();
     GamesDataUpdateTimer?.Stop();
     return(WebHost.StopAsync());
 }
Exemple #2
0
 public void Stop()
 {
     if (WebHost != null)
     {
         WebHost.StopAsync(TimeSpan.FromSeconds(0));
         WebHost.Dispose();
         WebHost = null;
     }
 }
Exemple #3
0
        public async Task Stop()
        {
            if (WebHost != null)
            {
                await WebHost.StopAsync();

                WebHost = null;
                _uri    = null;
            }
        }
        protected virtual void Dispose(bool disposing)
        {
            if (_disposedValue)
            {
                return;
            }
            if (disposing)
            {
                WebHost.StopAsync().GetAwaiter().GetResult();
                WebHost.Dispose();
            }

            _disposedValue = true;
        }
Exemple #5
0
        public async Task Stop()
        {
            if (WebHost != null)
            {
                try
                {
                    await WebHost.StopAsync();
                }
                catch (TaskCanceledException)
                {
                    // Ignore time out error
                }

                WebHost = null;
                _uri    = null;
            }
        }
Exemple #6
0
            public async Task OnStoppingServiceAsync(OperationContext context)
            {
                if (ProxyService != null)
                {
                    await ProxyService.ShutdownAsync(context).IgnoreFailure();
                }

                if (ContentCacheService != null)
                {
                    await ContentCacheService.ShutdownAsync(context).IgnoreFailure();
                }

                // Not passing cancellation token since it will already be signaled
                await WebHost.StopAsync();

                WebHost.Dispose();
            }
Exemple #7
0
            public async Task OnStoppingServiceAsync(OperationContext context)
            {
                // Not passing cancellation token since it will already be signaled

                // WebHost is null for out-of-proc casaas case.
                if (WebHost != null)
                {
                    await WebHost.StopAsync();
                }

                if (ProxyService != null)
                {
                    await ProxyService.ShutdownAsync(context).IgnoreFailure();
                }

                if (ContentCacheService != null)
                {
                    await ContentCacheService.ShutdownAsync(context).IgnoreFailure();
                }

                WebHost?.Dispose();
            }
Exemple #8
0
        public override async Task OnStop()
        {
            await base.OnStop();

            await WebHost.StopAsync();
        }