[Modify] Use it
This commit is contained in:
		| @@ -2843,22 +2843,13 @@ namespace WebSocketSharp | ||||
|         return; | ||||
|       } | ||||
|  | ||||
|       if (!username.IsNullOrEmpty ()) { | ||||
|         if (username.Contains (':') || !username.IsText ()) { | ||||
|           _logger.Error ("'username' contains an invalid character."); | ||||
|       if (!checkParametersForSetCredentials (username, password, out msg)) { | ||||
|         _logger.Error (msg); | ||||
|         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) { | ||||
|         if (!checkIfAvailable (true, false, false, true, out msg)) { | ||||
|           _logger.Error (msg); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user