[Modify] Polish it

This commit is contained in:
sta 2020-07-24 19:43:30 +09:00
parent 4f64885b91
commit 15344b9665

View File

@ -112,7 +112,9 @@ namespace WebSocketSharp.Net
public bool IsRestricted (bool response)
{
return (_headerType & HttpHeaderType.Restricted) == HttpHeaderType.Restricted
var headerType = _headerType & HttpHeaderType.Restricted;
return headerType == HttpHeaderType.Restricted
? (response ? IsResponse : IsRequest)
: false;
}