atanisoft / HttpServer

HTTP Server implemented using OpenMRN StateFlow patterns.
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

WS: Rework to queue frames rather than use a string buffer for text messages #9

Closed atanisoft closed 3 years ago

atanisoft commented 3 years ago

The current approach can lead to out-of-sequence deliveries leading to the following error being shown in the browser when multiple text based messages are being sent in excess of the maximum frame size:

index.html:336 WebSocket connection to 'ws://10.0.0.189/ws' failed: Received start of new message but previous message is unfinished.
connectWebSocket @ index.html:336
index.html:343 WS: Event
(anonymous) @ index.html:343
index.html:346 WS: CloseEvent
atanisoft commented 3 years ago

Fixed in https://github.com/atanisoft/HttpServer/commit/1b230c617bee59ed395b845e0cd0f117f8d5f4d6