[Modify] Polish it
This commit is contained in:
parent
c87c9615de
commit
678845433b
@ -945,13 +945,11 @@ namespace WebSocketSharp
|
|||||||
{
|
{
|
||||||
message = null;
|
message = null;
|
||||||
|
|
||||||
var invalid = protocols.Contains (
|
Func<string, bool> cond = protocol => protocol == null
|
||||||
protocol => protocol == null
|
|
||||||
|| protocol.Length == 0
|
|| protocol.Length == 0
|
||||||
|| !protocol.IsToken ()
|
|| !protocol.IsToken ();
|
||||||
);
|
|
||||||
|
|
||||||
if (invalid) {
|
if (protocols.Contains (cond)) {
|
||||||
message = "It contains an invalid value.";
|
message = "It contains an invalid value.";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user