[Modify] Polish it

This commit is contained in:
sta 2021-12-07 20:00:31 +09:00
parent 23b9a59700
commit 0f2c16f9ed

View File

@ -624,6 +624,7 @@ Extended Payload Length: {7}
{
if (!frame.IsMasked) {
frame._maskingKey = WebSocket.EmptyBytes;
completed (frame);
return;
@ -636,10 +637,12 @@ Extended Payload Length: {7}
bytes => {
if (bytes.Length != len) {
var msg = "The masking key of a frame could not be read.";
throw new WebSocketException (msg);
}
frame._maskingKey = bytes;
completed (frame);
},
error