[Modify] Polish it

This commit is contained in:
sta 2019-03-28 21:27:54 +09:00
parent b8c0741914
commit 08c29e7ee0

View File

@ -491,13 +491,13 @@ namespace WebSocketSharp.Net
if (cookie == null) if (cookie == null)
throw new ArgumentNullException ("cookie"); throw new ArgumentNullException ("cookie");
var pos = searchCookie (cookie); var idx = searchCookie (cookie);
if (pos == -1) { if (idx == -1) {
_list.Add (cookie); _list.Add (cookie);
return; return;
} }
_list[pos] = cookie; _list[idx] = cookie;
} }
/// <summary> /// <summary>