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