Skip to content

websockets: buffered amount not tracked in ArrayBuffer for typed arrays or DataView - fixes #5715#5716

Open
prakharbirla-ng wants to merge 1 commit intografana:masterfrom
prakharbirla-ng:master
Open

websockets: buffered amount not tracked in ArrayBuffer for typed arrays or DataView - fixes #5715#5716
prakharbirla-ng wants to merge 1 commit intografana:masterfrom
prakharbirla-ng:master

Conversation

@prakharbirla-ng
Copy link

@prakharbirla-ng prakharbirla-ng commented Mar 7, 2026

What?

When sending TypedArrays, bufferedAmount was not incremented.
Fixes the bug introduced in #5358

Why?

Buffered amount should be tracked when data is added to the queue so that it does not become negative.

Checklist

  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests for my changes.
  • I have run linter and tests locally (make check) and all pass.

Checklist: Documentation (only for k6 maintainers and if relevant)

Please do not merge this PR until the following items are filled out.

  • I have added the correct milestone and labels to the PR.
  • I have updated the release notes: link
  • I have updated or added an issue to the k6-documentation: grafana/k6-docs#NUMBER if applicable
  • I have updated or added an issue to the TypeScript definitions: grafana/k6-DefinitelyTyped#NUMBER if applicable

Related PR(s)/Issue(s)

Closes #5715

@prakharbirla-ng prakharbirla-ng requested a review from a team as a code owner March 7, 2026 13:48
@prakharbirla-ng prakharbirla-ng requested review from ankur22 and szkiba and removed request for a team March 7, 2026 13:48
@cla-assistant
Copy link

cla-assistant bot commented Mar 7, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebSocket bufferedAmount isn't tracked for TypedArrays or DataViews

1 participant