diff --git a/websocket-sharp/Server/WebSocketSessionManager.cs b/websocket-sharp/Server/WebSocketSessionManager.cs index 9c36856d..223e4d84 100644 --- a/websocket-sharp/Server/WebSocketSessionManager.cs +++ b/websocket-sharp/Server/WebSocketSessionManager.cs @@ -1118,8 +1118,10 @@ namespace WebSocketSharp.Server public bool PingTo (string message, string id) { IWebSocketSession session; + if (!TryGetSession (id, out session)) { var msg = "The session could not be found."; + throw new InvalidOperationException (msg); }