Merge pull request #1753 from aspnet/release/2.1
Fix WebSocketsSupportedConditionAttribute version check (#1751)
This commit is contained in:
commit
dcb8862090
|
|
@ -20,19 +20,14 @@ namespace Microsoft.AspNetCore.SignalR.Tests
|
||||||
// .NET Core 2.1 and greater has sockets
|
// .NET Core 2.1 and greater has sockets
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
// Non-Windows platforms have sockets
|
// Non-Windows platforms have Websockets
|
||||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Windows 8 and greater has sockets
|
// Windows 8 and greater has Websockets
|
||||||
if (Environment.Version >= new Version(6, 2))
|
return Environment.OSVersion.Version >= new Version(6, 2);
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue