weidazhao / Hosting

Hosting prototype
170 stars 35 forks source link

Timeout option on Gateway #42

Open rmja opened 7 years ago

rmja commented 7 years ago

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...