SignalR超时关闭时间

parent 17cb0ca0
...@@ -92,7 +92,6 @@ public void ConfigureServices(IServiceCollection services) ...@@ -92,7 +92,6 @@ public void ConfigureServices(IServiceCollection services)
services.AddSignalR(hubOptions => services.AddSignalR(hubOptions =>
{ {
hubOptions.EnableDetailedErrors = true; hubOptions.EnableDetailedErrors = true;
hubOptions.KeepAliveInterval = TimeSpan.FromMinutes(1);
}); });
// cors // cors
...@@ -141,7 +140,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) ...@@ -141,7 +140,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
endpoints.MapHub<AllotLogHub>("/performance/allotLogHub", options => endpoints.MapHub<AllotLogHub>("/performance/allotLogHub", options =>
{ {
options.Transports = HttpTransportType.WebSockets | HttpTransportType.LongPolling; options.Transports = HttpTransportType.WebSockets | HttpTransportType.LongPolling;
options.WebSockets.CloseTimeout = TimeSpan.FromMinutes(1); options.WebSockets.CloseTimeout = TimeSpan.FromMinutes(20);
}); });
endpoints.MapControllers(); endpoints.MapControllers();
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment