Просмотр исходного кода

😁增加SignalR默认数据包大小10M

zuohuaijun 2 лет назад
Родитель
Сommit
dbfb1ca5f8
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      Admin.NET/Admin.NET.Core/SignalR/SignalRSetup.cs

+ 3 - 3
Admin.NET/Admin.NET.Core/SignalR/SignalRSetup.cs

@@ -27,7 +27,7 @@ public static class SignalRSetup
             options.EnableDetailedErrors = true;
             options.ClientTimeoutInterval = TimeSpan.FromMinutes(2);
             options.KeepAliveInterval = TimeSpan.FromMinutes(1);
-            options.MaximumReceiveMessageSize = 1024 * 1024 * 10; //默认每次数据包最大为32K,这里设为 10M 
+            options.MaximumReceiveMessageSize = 1024 * 1024 * 10; // 数据包大小10M,默认最大为32K
         }).AddNewtonsoftJsonProtocol(options => SetNewtonsoftJsonSetting(options.PayloadSerializerSettings));
 
         // 若未启用Redis缓存,直接返回
@@ -37,9 +37,9 @@ public static class SignalRSetup
 
         // 若已开启集群配置,则把SignalR配置为支持集群模式
         var clusterOpt = App.GetOptions<ClusterOptions>();
-        if (!clusterOpt.Enabled)        
+        if (!clusterOpt.Enabled)
             return;
-        
+
         var redisOptions = clusterOpt.SentinelConfig;
         ConnectionMultiplexer connection1;
         if (clusterOpt.IsSentinel) // 哨兵模式