[Modify] Throw exception
This commit is contained in:
		@@ -596,8 +596,12 @@ namespace WebSocketSharp.Server
 | 
				
			|||||||
    /// </param>
 | 
					    /// </param>
 | 
				
			||||||
    protected void SendAsync (FileInfo file, Action<bool> completed)
 | 
					    protected void SendAsync (FileInfo file, Action<bool> completed)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      if (_websocket != null)
 | 
					      if (_websocket == null) {
 | 
				
			||||||
        _websocket.SendAsync (file, completed);
 | 
					        var msg = "The current state of the connection is not Open.";
 | 
				
			||||||
 | 
					        throw new InvalidOperationException (msg);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      _websocket.SendAsync (file, completed);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /// <summary>
 | 
					    /// <summary>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user