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