[Modify] Replace it
This commit is contained in:
		@@ -2776,16 +2776,21 @@ namespace WebSocketSharp
 | 
			
		||||
    public void SetCookie (Cookie cookie)
 | 
			
		||||
    {
 | 
			
		||||
      lock (_forConn) {
 | 
			
		||||
        var msg = checkIfAvailable (true, false, true, false, false, true) ??
 | 
			
		||||
                  (cookie == null ? "'cookie' is null." : null);
 | 
			
		||||
 | 
			
		||||
        if (msg != null) {
 | 
			
		||||
        string msg;
 | 
			
		||||
        if (!checkIfAvailable (true, false, true, false, false, true, out msg)) {
 | 
			
		||||
          _logger.Error (msg);
 | 
			
		||||
          error ("An error has occurred in setting a cookie.", null);
 | 
			
		||||
 | 
			
		||||
          return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (cookie == null) {
 | 
			
		||||
          _logger.Error ("'cookie' is null.");
 | 
			
		||||
          error ("An error has occurred in setting a cookie.", null);
 | 
			
		||||
 | 
			
		||||
          return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        lock (_cookies.SyncRoot)
 | 
			
		||||
          _cookies.SetOrRemove (cookie);
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user