This is a very difficult issue to reproduce, as the browsers themselves don't always exhibit the problem.
Reproducing in our environment means sending a large >120k websocket message from the Browser (tested on Chrome) to the Go program from a "clean" browser - meaning either all caches, cookies cleared, or a new Incognito mode browser.
When sent to the server, the browser will chunk the frame into multiple parts, setting the hybiFrameReader.header.Fin bit to false
What did you expect to see?
I expected the whole frame to arrive.
What did you see instead?
arbitrary cut off of string frame.
My fix was to change the Receive function to check if the frame Fin was false, and if so, goto Again: