[Modify] Polish it

This commit is contained in:
sta 2021-12-12 21:57:12 +09:00
parent 0e0fa28662
commit 27847e04dc

View File

@ -883,8 +883,11 @@ Extended Payload Length: {7}
((ushort) header).InternalToByteArray (ByteOrder.Big), 0, 2
);
if (_payloadLength > 125)
buff.Write (_extPayloadLength, 0, _payloadLength == 126 ? 2 : 8);
if (_payloadLength > 125) {
var cnt = _payloadLength == 126 ? 2 : 8;
buff.Write (_extPayloadLength, 0, cnt);
}
if (_mask == Mask.On)
buff.Write (_maskingKey, 0, 4);