[Modify] Polish it

This commit is contained in:
sta 2021-12-07 19:56:49 +09:00
parent e8ffd88514
commit 23b9a59700

View File

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