public void Abort() { Log.Debug("Server abort started..."); Queue.Abort(); Sessions.Abort(); Http.Stop(); }
public void Abort() { Queue.Abort(); Sessions.Abort(); try { receiver?.Dispose(); receiver = null; } catch (Exception error) { Log.Error("Failed to stop HTTP Receiver!", error); } }
public void Abort() { Log.Debug("Server abort started..."); Queue.Abort(); Sessions.Abort(); try { receiver?.Dispose(); receiver = null; } catch (Exception error) { Log.Error("Failed to stop HTTP Receiver!", error); } }
public async Task Shutdown(TimeSpan timeout) { using (var tokenSource = new CancellationTokenSource(timeout)) { var token = tokenSource.Token; token.Register(() => { Queue.Abort(); Sessions.Abort(); }); await Task.Run(() => { Queue.Stop(); Sessions.Stop(); }, token); } }
public async Task Shutdown(TimeSpan timeout) { Log.Debug("Shutdown started..."); using (var tokenSource = new CancellationTokenSource(timeout)) { var token = tokenSource.Token; using (token.Register(() => { Queue.Abort(); Sessions.Abort(); })) { await Task.Run(() => { Queue.Stop(); Sessions.Stop(); }, token); } } }