[Modify] Polish it

This commit is contained in:
sta 2019-08-25 22:05:12 +09:00
parent 7ae2132dc5
commit 14f579afc8

View File

@ -597,14 +597,15 @@ Extended Payload Length: {7}
Action<Exception> error Action<Exception> error
) )
{ {
var len = frame.IsMasked ? 4 : 0; if (!frame.IsMasked) {
if (len == 0) {
frame._maskingKey = WebSocket.EmptyBytes; frame._maskingKey = WebSocket.EmptyBytes;
completed (frame); completed (frame);
return; return;
} }
var len = 4;
stream.ReadBytesAsync ( stream.ReadBytesAsync (
len, len,
bytes => { bytes => {