Преглед на файлове

changed connection close from 25 to 50 sceonds

Scrublord1336 преди 6 години
родител
ревизия
2593f8bf68
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/XUnity.AutoTranslator.Plugin.Core/Web/KnownHttpEndpoint.cs

+ 2 - 2
src/XUnity.AutoTranslator.Plugin.Core/Web/KnownHttpEndpoint.cs

@@ -8,7 +8,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Web
 {
    public abstract class KnownHttpEndpoint : IKnownEndpoint
    {
-      private static readonly TimeSpan MaxUnusedLifespan = TimeSpan.FromSeconds( 25 );
+      private static readonly TimeSpan MaxUnusedLifespan = TimeSpan.FromSeconds( 50 );
 
       private ServicePoint[] _servicePoints;
       private bool _isBusy = false;
@@ -118,7 +118,7 @@ namespace XUnity.AutoTranslator.Plugin.Core.Web
          if( !_isBusy && _clientLastUse.HasValue && DateTime.UtcNow - _clientLastUse > MaxUnusedLifespan && !_client.IsBusy
             && _servicePoints != null && _servicePoints.Length > 0 )
          {
-            Logger.Current.Debug( "Closing service points because they were not used for 25 seconds." );
+            Logger.Current.Debug( $"Closing service points because they were not used for {(int)MaxUnusedLifespan.TotalSeconds} seconds." );
 
             _isBusy = true;
             _clientLastUse = null;