diff --git a/websocket-sharp/Net/CookieCollection.cs b/websocket-sharp/Net/CookieCollection.cs
index 5e73aeba..8f91063a 100644
--- a/websocket-sharp/Net/CookieCollection.cs
+++ b/websocket-sharp/Net/CookieCollection.cs
@@ -603,11 +603,19 @@ namespace WebSocketSharp.Net
///
/// A to add.
///
+ ///
+ /// The collection is read-only.
+ ///
///
/// is .
///
public void Add (Cookie cookie)
{
+ if (_readOnly) {
+ var msg = "The collection is read-only.";
+ throw new InvalidOperationException (msg);
+ }
+
if (cookie == null)
throw new ArgumentNullException ("cookie");