[Modify] Throw exception
This commit is contained in:
		@@ -842,8 +842,12 @@ namespace WebSocketSharp.Server
 | 
			
		||||
    public void CloseSession (string id)
 | 
			
		||||
    {
 | 
			
		||||
      IWebSocketSession session;
 | 
			
		||||
      if (TryGetSession (id, out session))
 | 
			
		||||
        session.Context.WebSocket.Close ();
 | 
			
		||||
      if (!TryGetSession (id, out session)) {
 | 
			
		||||
        var msg = "The session could not be found.";
 | 
			
		||||
        throw new ArgumentException (msg, "id");
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      session.Context.WebSocket.Close ();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// <summary>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user