Skip to content

Commit

Permalink
small bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gravydevsupreme committed May 5, 2018
1 parent 3bc18d2 commit 2d02719
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/XUnity.AutoTranslator.Plugin.Core/Web/AutoTranslateClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,22 @@ public static IEnumerator TranslateByWWW( string untranslated, string from, stri
yield return www;
_runningTranslations--;

_translationCount++;
if( Settings.MaxConcurrentTranslations == Settings.DefaultMaxConcurrentTranslations )
{
_translationCount++;
if( _translationCount > Settings.MaxTranslationsBeforeSlowdown )
{
Settings.MaxConcurrentTranslations = 1;
Console.WriteLine( "[XUnity.AutoTranslator][WARN]: Maximum translations per session reached. Entering slowdown mode." );
}
}

if( !Settings.IsShutdown )
if( !Settings.IsShutdown )
{
if( _translationCount > Settings.MaxTranslationsBeforeShutdown )
{
if( _translationCount > Settings.MaxTranslationsBeforeShutdown )
{
Settings.IsShutdown = true;
Console.WriteLine( "[XUnity.AutoTranslator][ERROR]: Maximum translations per session reached. Shutting plugin down." );
}
Settings.IsShutdown = true;
Console.WriteLine( "[XUnity.AutoTranslator][ERROR]: Maximum translations per session reached. Shutting plugin down." );
}
}

Expand Down

0 comments on commit 2d02719

Please sign in to comment.