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