Hello,
I've been testing out the package and really like it.
I did run across an issue with large responses. When a server returns a response larger than 4096 it gets truncated.
The problem appears to be that the result of the websocket NextReader is wrapped in bufio.NewReader which then immediately buffers 4096 from the websocket reader. That bufio is then passed to handler.HandleMessage in a goroutine. Before it can read the rest of the buffer the main thread makes another call to NextReader wiping out the previous buffer that the bufio is still reading.
Hello,
I've been testing out the package and really like it.
I did run across an issue with large responses. When a server returns a response larger than 4096 it gets truncated.
The problem appears to be that the result of the websocket NextReader is wrapped in bufio.NewReader which then immediately buffers 4096 from the websocket reader. That bufio is then passed to handler.HandleMessage in a goroutine. Before it can read the rest of the buffer the main thread makes another call to NextReader wiping out the previous buffer that the bufio is still reading.