From 587bf34c1877f68f8790cdb97e99aaa9c26f88de Mon Sep 17 00:00:00 2001 From: sta Date: Thu, 26 Nov 2020 20:14:50 +0900 Subject: [PATCH] [Modify] Add an empty check --- websocket-sharp/Net/ClientSslConfiguration.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/websocket-sharp/Net/ClientSslConfiguration.cs b/websocket-sharp/Net/ClientSslConfiguration.cs index 812114b0..823a6969 100644 --- a/websocket-sharp/Net/ClientSslConfiguration.cs +++ b/websocket-sharp/Net/ClientSslConfiguration.cs @@ -82,6 +82,9 @@ namespace WebSocketSharp.Net if (targetHost == null) throw new ArgumentNullException ("targetHost"); + if (targetHost.Length == 0) + throw new ArgumentException ("An empty string.", "targetHost"); + _targetHost = targetHost; _enabledSslProtocols = SslProtocols.None;