[Modify] Polish it

This commit is contained in:
sta 2021-12-07 19:51:53 +09:00
parent 4f7c66f051
commit e8ffd88514

View File

@ -551,8 +551,10 @@ Extended Payload Length: {7}
)
{
var len = frame.ExtendedPayloadLengthWidth;
if (len == 0) {
frame._extPayloadLength = WebSocket.EmptyBytes;
completed (frame);
return;
@ -563,10 +565,12 @@ Extended Payload Length: {7}
bytes => {
if (bytes.Length != len) {
var msg = "The extended payload length of a frame could not be read.";
throw new WebSocketException (msg);
}
frame._extPayloadLength = bytes;
completed (frame);
},
error