diff --git a/websocket-sharp/Server/WebSocketSessionManager.cs b/websocket-sharp/Server/WebSocketSessionManager.cs index f528d307..47975fbf 100644 --- a/websocket-sharp/Server/WebSocketSessionManager.cs +++ b/websocket-sharp/Server/WebSocketSessionManager.cs @@ -1158,24 +1158,26 @@ namespace WebSocketSharp.Server /// -or- /// /// + /// could not be UTF-8-encoded. + /// + /// + /// + /// /// The session could not be found. /// /// /// -or- /// /// - /// could not be UTF-8-encoded. + /// The current state of the WebSocket connection is not Open. /// /// - /// - /// The current state of the WebSocket connection is not Open. - /// public void SendTo (string data, 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 (data);