[Modify] Polish it
This commit is contained in:
parent
71cfca9ac3
commit
46f4649106
@ -888,12 +888,22 @@ namespace WebSocketSharp.Net
|
||||
}
|
||||
|
||||
private void doWithCheckingState (
|
||||
Action <string, string> action, string name, string value, bool response, bool setState)
|
||||
Action <string, string> action,
|
||||
string name,
|
||||
string value,
|
||||
bool response,
|
||||
bool setState
|
||||
)
|
||||
{
|
||||
checkState (response);
|
||||
action (name, value);
|
||||
if (setState && _state == HttpHeaderType.Unspecified)
|
||||
_state = response ? HttpHeaderType.Response : HttpHeaderType.Request;
|
||||
|
||||
setState = setState && _state == HttpHeaderType.Unspecified;
|
||||
|
||||
if (!setState)
|
||||
return;
|
||||
|
||||
_state = response ? HttpHeaderType.Response : HttpHeaderType.Request;
|
||||
}
|
||||
|
||||
private void doWithoutCheckingName (Action <string, string> action, string name, string value)
|
||||
|
Loading…
Reference in New Issue
Block a user