[Modify] Polish it

This commit is contained in:
sta 2017-09-30 14:17:54 +09:00
parent c87c9615de
commit 678845433b

View File

@ -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;
} }