From 8ce8cf02f3f9eee31dfd3d0a8a511084bf08a995 Mon Sep 17 00:00:00 2001 From: sta Date: Sun, 27 Dec 2020 21:50:24 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/HttpListenerContext.cs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/websocket-sharp/Net/HttpListenerContext.cs b/websocket-sharp/Net/HttpListenerContext.cs index 478c24aa..137bb728 100644 --- a/websocket-sharp/Net/HttpListenerContext.cs +++ b/websocket-sharp/Net/HttpListenerContext.cs @@ -252,23 +252,6 @@ namespace WebSocketSharp.Net internal HttpListenerWebSocketContext GetWebSocketContext (string protocol) { - if (_websocketContext != null) - return _websocketContext; - - if (protocol != null) { - if (protocol.Length == 0) { - var msg = "An empty string."; - - throw new ArgumentException (msg, "protocol"); - } - - if (!protocol.IsToken ()) { - var msg = "It contains an invalid character."; - - throw new ArgumentException (msg, "protocol"); - } - } - _websocketContext = new HttpListenerWebSocketContext (this, protocol); return _websocketContext;