[Modify] Use it
This commit is contained in:
parent
8478bfd9ba
commit
03aad074e6
@ -2843,20 +2843,11 @@ namespace WebSocketSharp
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!username.IsNullOrEmpty ()) {
|
if (!checkParametersForSetCredentials (username, password, out msg)) {
|
||||||
if (username.Contains (':') || !username.IsText ()) {
|
_logger.Error (msg);
|
||||||
_logger.Error ("'username' contains an invalid character.");
|
error ("An error has occurred in setting the credentials.", null);
|
||||||
error ("An error has occurred in setting the credentials.", null);
|
|
||||||
|
|
||||||
return;
|
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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user