Example #1
0
        public void ProcessRequestsAsyncEnablesKeepAliveTimeout()
        {
            var requestProcessingTask = _http1Connection.ProcessRequestsAsync <object>(null);

            var expectedKeepAliveTimeout = _serviceContext.ServerOptions.Limits.KeepAliveTimeout.Ticks;

            _timeoutControl.Verify(cc => cc.SetTimeout(expectedKeepAliveTimeout, TimeoutAction.StopProcessingNextRequest));

            _http1Connection.StopProcessingNextRequest();
            _application.Output.Complete();

            requestProcessingTask.Wait();
        }