weidazhao/Hosting

Timeout option on Gateway

Opened this issue · 0 comments

rmja commented

It would be nice if the timeout option of the underlying HttpClient was exposed somehow. I am currently adjusting the timeout like this:

services.AddHttpRequestDispatcherProvider(new HttpRequestDispatcherProvider(() =>
            {
                var dispatcher = new HttpRequestDispatcher();
                dispatcher.Timeout = TimeSpan.FromMinutes(10);
                return dispatcher;
            }, null, new[] { new AlwaysTreatedAsNonTransientExceptionHandler() }, null));

But that is far from beautiful:) The 100s default timeout is not enough for some of the long running jobs that I have...