Skip to content

Server messages larger than 4096 are truncated #2

@Daniel-Daley

Description

@Daniel-Daley

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions