Skip to content

Commit

Permalink
Merge pull request #9 from Tabing010102/master
Browse files Browse the repository at this point in the history
修复并发翻译
  • Loading branch information
fkiliver authored May 6, 2024
2 parents cf8fd32 + cb2ca52 commit cd04034
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions SakuraTranslator/SakuraTranslatorEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
using System.Text;
using XUnity.AutoTranslator.Plugin.Core.Endpoints;

[assembly: AssemblyVersion("0.3.1")]
[assembly: AssemblyFileVersion("0.3.1")]
[assembly: AssemblyVersion("0.3.2")]
[assembly: AssemblyFileVersion("0.3.2")]

namespace SakuraTranslator
{
Expand Down Expand Up @@ -44,6 +44,10 @@ public void Initialize(IInitializationContext context)
{
_maxConcurrency = 1;
}
if (_maxConcurrency > 2)
{
ServicePointManager.DefaultConnectionLimit = _maxConcurrency;
}
if (!bool.TryParse(context.GetOrCreateSetting<string>("Sakura", "UseDict", string.Empty), out _useDict))
{
_useDict = false;
Expand Down

0 comments on commit cd04034

Please sign in to comment.