Skip to content

Commit

Permalink
Fix: Added missing checks for removing a DependencyCollection in the …
Browse files Browse the repository at this point in the history
…resolver
  • Loading branch information
guerro323 committed Mar 20, 2022
1 parent 9c612de commit 71f8a38
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion revghost/Injection/DependencyCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@ public bool TryResolve(out bool canStillBeResolvedSynchronously)
onFinalList.Clear();
}

return Queued.Count == 0;
if (Queued.Count != 0)
return true;

canStillBeResolvedSynchronously = false;
return false;

}

public void Dispose()
Expand Down
3 changes: 2 additions & 1 deletion revghost/Injection/SchedulerDependencyResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public class SchedulerDependencyResolver : IDependencyResolver, IDisposable
bool wantToContinue;
do
{
collection.TryResolve(out wantToContinue);
if (!collection.TryResolve(out wantToContinue))
break;
} while (wantToContinue);

if (collection.Dependencies.IsEmpty)
Expand Down
2 changes: 1 addition & 1 deletion revghost/revghost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>10</LangVersion>
<VersionPrefix>2022.0220.1631</VersionPrefix>
<VersionPrefix>2022.0320.1317</VersionPrefix>
<Copyright>guerro323</Copyright>
<PackageProjectUrl>https://github.com/guerro323/GameHost</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/guerro323/GameHost/blob/v3-dev/LICENSE</PackageLicenseUrl>
Expand Down

0 comments on commit 71f8a38

Please sign in to comment.