Merge pull request #1 from mca0815/fix-invalid-frame-continuation

fixed "Invalid frame continuation" exception when ping or pong frames a…
This commit is contained in:
mca0815 2017-06-13 02:04:17 +02:00 committed by GitHub
commit e5164f0b49

View file

@ -790,13 +790,28 @@ begin
wdcPing: wdcPing:
begin begin
WriteData(iaReadBuffer, wdcPong); //send pong + same data back WriteData(iaReadBuffer, wdcPong); //send pong + same data back
lFirstDataCode := lDataCode;
//bFIN := False; //ignore ping when we wait for data? //ping received, ignore while were are receiving fragmented frames
if (lFirstDataCode in [wdcText, wdcBinary]) then
begin
bFIN := False;
end
else
begin
lFirstDataCode := lDataCode;
end;
end; end;
wdcPong: wdcPong:
begin begin
//pong received, ignore; //pong received, ignore while were are receiving fragmented frames
lFirstDataCode := lDataCode; if (lFirstDataCode in [wdcText, wdcBinary]) then
begin
bFIN := False;
end
else
begin
lFirstDataCode := lDataCode;
end;
end; end;
end; end;
end end