Fixed a possible Invalid frame continuation. Data = ... exception in TIdIOHandlerWebsocket.ReadMessage:
When a large message is being received that comes in as several fragments, it may happen that a wdcPong is also received inbetween of the fragments. This results in bFIN being true and the function being leaved.
When the function is entered again for the next fragment, lFirstDataCode is wdcNone. This results in the exception being thrown in the wdcContinuation of the case statement.
Solution: Reset bFIN to false and therefore ignore the wdcPong as long as were are still receiving fragments. My client doesn't send pings so I didn't see it in my scenario but the same should apply for wdcPing frames.
Fixed a possible
Invalid frame continuation. Data = ...
exception inTIdIOHandlerWebsocket.ReadMessage
:When a large message is being received that comes in as several fragments, it may happen that a
wdcPong
is also received inbetween of the fragments. This results inbFIN
being true and the function being leaved. When the function is entered again for the next fragment,lFirstDataCode
iswdcNone
. This results in the exception being thrown in thewdcContinuation
of thecase
statement.Solution: Reset
bFIN
to false and therefore ignore thewdcPong
as long as were are still receiving fragments. My client doesn't send pings so I didn't see it in my scenario but the same should apply forwdcPing
frames.