public Task StopAsync(CancellationToken cancellationToken)
 {
     UserActivityFileMonitor?.Dispose();
     ProcessScannerTimer?.Stop();
     GamesDataUpdateTimer?.Stop();
     return(WebHost.StopAsync());
 }
Ejemplo n.º 2
0
 public void Stop()
 {
     if (WebHost != null)
     {
         WebHost.StopAsync(TimeSpan.FromSeconds(0));
         WebHost.Dispose();
         WebHost = null;
     }
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 5
0
        public async Task Stop()
        {
            if (WebHost != null)
            {
                try
                {
                    await WebHost.StopAsync();
                }
                catch (TaskCanceledException)
                {
                    // Ignore time out error
                }

                WebHost = null;
                _uri    = null;
            }
        }
Ejemplo n.º 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();
            }
Ejemplo n.º 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();
            }
Ejemplo n.º 8
0
        public override async Task OnStop()
        {
            await base.OnStop();

            await WebHost.StopAsync();
        }