Skip to content

Commit

Permalink
fix: protocol parsing errors when using ws compression and receiving …
Browse files Browse the repository at this point in the history
…pong messages
  • Loading branch information
rsafonseca committed Jan 29, 2025
1 parent f7dfee9 commit 1a643e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func (r *websocketReader) Read(p []byte) (int, error) {
// Add to the pending list if dealing with uncompressed frames or
// after we have received the full compressed message and decompressed it.
if addToPending {
r.pending = append(r.pending, b)
r.pending = append(r.pending, bytes.Clone(b))
}
}
// In case of compression, there may be nothing to drain
Expand Down

0 comments on commit 1a643e7

Please sign in to comment.