[Modify] Move it out
This commit is contained in:
		@@ -2818,6 +2818,22 @@ namespace WebSocketSharp
 | 
				
			|||||||
        return;
 | 
					        return;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if (!username.IsNullOrEmpty ()) {
 | 
				
			||||||
 | 
					        if (username.Contains (':') || !username.IsText ()) {
 | 
				
			||||||
 | 
					          _logger.Error ("'username' contains an invalid character.");
 | 
				
			||||||
 | 
					          error ("An error has occurred in setting the credentials.", null);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (!password.IsNullOrEmpty () && !password.IsText ()) {
 | 
				
			||||||
 | 
					          _logger.Error ("'password' contains an invalid character.");
 | 
				
			||||||
 | 
					          error ("An error has occurred in setting the credentials.", null);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      lock (_forState) {
 | 
					      lock (_forState) {
 | 
				
			||||||
        if (!checkIfAvailable (true, false, false, true, out msg)) {
 | 
					        if (!checkIfAvailable (true, false, false, true, out msg)) {
 | 
				
			||||||
          _logger.Error (msg);
 | 
					          _logger.Error (msg);
 | 
				
			||||||
@@ -2834,20 +2850,6 @@ namespace WebSocketSharp
 | 
				
			|||||||
          return;
 | 
					          return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (username.Contains (':') || !username.IsText ()) {
 | 
					 | 
				
			||||||
          _logger.Error ("'username' contains an invalid character.");
 | 
					 | 
				
			||||||
          error ("An error has occurred in setting the credentials.", null);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          return;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        if (!password.IsNullOrEmpty () && !password.IsText ()) {
 | 
					 | 
				
			||||||
          _logger.Error ("'password' contains an invalid character.");
 | 
					 | 
				
			||||||
          error ("An error has occurred in setting the credentials.", null);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          return;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        _credentials = new NetworkCredential (username, password, _uri.PathAndQuery);
 | 
					        _credentials = new NetworkCredential (username, password, _uri.PathAndQuery);
 | 
				
			||||||
        _preAuth = preAuth;
 | 
					        _preAuth = preAuth;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user