-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix recvloop so it doens't use as much memory
recvloop was using ws.ReadMessage, which was in turn working with io.ReadAll. It turns out for the current use, this isn't a good way to read the message of the web socket connection. Instead we should buffer the read, store it in a buffer that can increase with the test, which is then cloned before being unmarshaled. We have more control over the memory by working in this way.
- Loading branch information
Showing
1 changed file
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters