diff --git a/websocket-sharp/Server/WebSocketSessionManager.cs b/websocket-sharp/Server/WebSocketSessionManager.cs index 47975fbf..e91924d8 100644 --- a/websocket-sharp/Server/WebSocketSessionManager.cs +++ b/websocket-sharp/Server/WebSocketSessionManager.cs @@ -1218,12 +1218,6 @@ namespace WebSocketSharp.Server /// -or- /// /// - /// The session could not be found. - /// - /// - /// -or- - /// - /// /// cannot be read. /// /// @@ -1240,14 +1234,22 @@ namespace WebSocketSharp.Server /// /// /// - /// The current state of the WebSocket connection is not Open. + /// + /// The session could not be found. + /// + /// + /// -or- + /// + /// + /// The current state of the WebSocket connection is not Open. + /// /// public void SendTo (Stream stream, int length, string id) { IWebSocketSession session; if (!TryGetSession (id, out session)) { var msg = "The session could not be found."; - throw new ArgumentException (msg, "id"); + throw new InvalidOperationException (msg); } session.Context.WebSocket.Send (stream, length);