From 890c8566d69e0760dc9ee11828ce12129d44657a Mon Sep 17 00:00:00 2001 From: Mikael Mengistu Date: Wed, 28 Mar 2018 14:56:03 -0700 Subject: [PATCH] Fix WebSocketsSupportedConditionAttribute version check (#1751) --- .../WebSocketsSupportedConditionAttribute.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/test/Microsoft.AspNetCore.SignalR.Tests.Utils/WebSocketsSupportedConditionAttribute.cs b/test/Microsoft.AspNetCore.SignalR.Tests.Utils/WebSocketsSupportedConditionAttribute.cs index c362238463..5a831e73fb 100644 --- a/test/Microsoft.AspNetCore.SignalR.Tests.Utils/WebSocketsSupportedConditionAttribute.cs +++ b/test/Microsoft.AspNetCore.SignalR.Tests.Utils/WebSocketsSupportedConditionAttribute.cs @@ -20,19 +20,14 @@ namespace Microsoft.AspNetCore.SignalR.Tests // .NET Core 2.1 and greater has sockets return true; #else - // Non-Windows platforms have sockets + // Non-Windows platforms have Websockets if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return true; } - // Windows 8 and greater has sockets - if (Environment.Version >= new Version(6, 2)) - { - return true; - } - - return false; + // Windows 8 and greater has Websockets + return Environment.OSVersion.Version >= new Version(6, 2); #endif } }