Skip to content

Commit 9d8bc1d

Browse files
committed
[Modify] Polish it
1 parent 018345b commit 9d8bc1d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

websocket-sharp/Net/CookieCollection.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,17 +786,20 @@ public bool Remove (Cookie cookie)
786786
{
787787
if (_readOnly) {
788788
var msg = "The collection is read-only.";
789+
789790
throw new InvalidOperationException (msg);
790791
}
791792

792793
if (cookie == null)
793794
throw new ArgumentNullException ("cookie");
794795

795796
var idx = search (cookie);
797+
796798
if (idx == -1)
797799
return false;
798800

799801
_list.RemoveAt (idx);
802+
800803
return true;
801804
}
802805

0 commit comments

Comments
 (0)