From acd3b3495dfeb0316e887acf2836fc01b150b7e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E5=A4=B4?= Date: Wed, 1 May 2024 11:26:48 +0800 Subject: [PATCH] fix wss --- NewLife.Core/Net/NetHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NewLife.Core/Net/NetHelper.cs b/NewLife.Core/Net/NetHelper.cs index f82d37603..e74d8b226 100644 --- a/NewLife.Core/Net/NetHelper.cs +++ b/NewLife.Core/Net/NetHelper.cs @@ -665,8 +665,8 @@ public static ISocketClient CreateRemote(this Uri uri) { return uri.Scheme switch { - "ws" => new WebSocketClient(uri) { SslProtocol = SslProtocols.Tls12 }, - "wss" => new WebSocketClient(uri), + "wss" => new WebSocketClient(uri) { SslProtocol = SslProtocols.Tls12 }, + "ws" => new WebSocketClient(uri), _ => throw new NotSupportedException($"The {uri.Scheme} protocol is not supported"), }; }