From 61fbdf3713c5bd064211f21b4947f90a0f1eaeec Mon Sep 17 00:00:00 2001 From: sta Date: Thu, 21 Mar 2019 21:50:36 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/CookieCollection.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/websocket-sharp/Net/CookieCollection.cs b/websocket-sharp/Net/CookieCollection.cs index dfd9a8a1..fadf6be4 100644 --- a/websocket-sharp/Net/CookieCollection.cs +++ b/websocket-sharp/Net/CookieCollection.cs @@ -176,9 +176,12 @@ namespace WebSocketSharp.Net if (name == null) throw new ArgumentNullException ("name"); - foreach (var cookie in Sorted) - if (cookie.Name.Equals (name, StringComparison.InvariantCultureIgnoreCase)) + var compType = StringComparison.InvariantCultureIgnoreCase; + + foreach (var cookie in Sorted) { + if (cookie.Name.Equals (name, compType)) return cookie; + } return null; }