diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs
index cb9043e0..fbcd65f5 100644
--- a/websocket-sharp/WebSocket.cs
+++ b/websocket-sharp/WebSocket.cs
@@ -440,10 +440,6 @@ namespace WebSocketSharp
/// Gets or sets a value indicating whether the URL redirection for
/// the handshake request is allowed.
///
- ///
- /// The set operation works if the current state of the interface is
- /// New or Closed.
- ///
///
///
/// true if the interface allows the URL redirection for
@@ -454,8 +450,17 @@ namespace WebSocketSharp
///
///
///
- /// The set operation is not available if the interface is not for
- /// the client.
+ ///
+ /// The set operation is not available if the interface is not for
+ /// the client.
+ ///
+ ///
+ /// -or-
+ ///
+ ///
+ /// The set operation is not available when the current state of
+ /// the interface is neither New nor Closed.
+ ///
///
public bool EnableRedirection {
get {
@@ -464,14 +469,17 @@ namespace WebSocketSharp
set {
if (!_isClient) {
- var msg = "The interface is not for the client.";
+ var msg = "The set operation is not available.";
throw new InvalidOperationException (msg);
}
lock (_forState) {
- if (!canSet ())
- return;
+ if (!canSet ()) {
+ var msg = "The set operation is not available.";
+
+ throw new InvalidOperationException (msg);
+ }
_enableRedirection = value;
}