Merge pull request #1753 from aspnet/release/2.1

Fix WebSocketsSupportedConditionAttribute version check (#1751)
This commit is contained in:
Mikael Mengistu 2018-03-28 15:01:08 -07:00 committed by GitHub
commit dcb8862090
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 8 deletions

View File

@ -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
} }
} }