From 0bb0cd19b8143fafd12ea0f601610c0360a81d67 Mon Sep 17 00:00:00 2001 From: sta Date: Mon, 21 Aug 2017 16:10:29 +0900 Subject: [PATCH] [Modify] Throw InvalidOperationException --- websocket-sharp/Server/WebSocketSessionManager.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/websocket-sharp/Server/WebSocketSessionManager.cs b/websocket-sharp/Server/WebSocketSessionManager.cs index e91924d8..d2243667 100644 --- a/websocket-sharp/Server/WebSocketSessionManager.cs +++ b/websocket-sharp/Server/WebSocketSessionManager.cs @@ -1293,25 +1293,25 @@ namespace WebSocketSharp.Server /// /// /// + /// is an empty string. + /// + /// /// - /// is an empty string. + /// The session could not be found. /// /// /// -or- /// /// - /// The session could not be found. + /// The current state of the WebSocket connection is not Open. /// /// - /// - /// The current state of the WebSocket connection is not Open. - /// public void SendToAsync (byte[] data, string id, Action completed) { 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 (data, completed);