diff --git a/websocket-sharp/Server/WebSocketSessionManager.cs b/websocket-sharp/Server/WebSocketSessionManager.cs index 43a472f6..1db8d6cc 100644 --- a/websocket-sharp/Server/WebSocketSessionManager.cs +++ b/websocket-sharp/Server/WebSocketSessionManager.cs @@ -1440,12 +1440,6 @@ namespace WebSocketSharp.Server /// -or- /// /// - /// The session could not be found. - /// - /// - /// -or- - /// - /// /// cannot be read. /// /// @@ -1462,7 +1456,15 @@ 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 SendToAsync ( Stream stream, int length, string id, Action completed @@ -1471,7 +1473,7 @@ namespace WebSocketSharp.Server 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.SendAsync (stream, length, completed);