Skip to content
This repository was archived by the owner on Jul 9, 2023. It is now read-only.

Commit 6e747d2

Browse files
authored
Update RunTime.cs
fix compatibility bug
1 parent 7f3ef04 commit 6e747d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Titanium.Web.Proxy/Helpers/RunTime.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ private static bool isSocketReuseAvailable()
7474
return false; // play it safe if we can not figure out what the framework is
7575

7676
// make sure we are on .NETCoreApp
77-
if (ver.Contains(".NETCoreApp", StringComparison.InvariantCultureIgnoreCase))
77+
ver = ver.ToLower(); // make everything lowercase to simplify comparison
78+
if (ver.Contains(".netcoreapp", StringComparison.InvariantCultureIgnoreCase))
7879
{
79-
var versionString = ver.Replace(".NETCoreApp,Version=v", "",
80-
StringComparison.InvariantCultureIgnoreCase);
80+
var versionString = ver.Replace(".netcoreapp,version=v", "");
8181
var versionArr = versionString.Split('.');
8282
var majorVersion = Convert.ToInt32(versionArr[0]);
8383

0 commit comments

Comments
 (0)