mirror of
https://github.com/oven-sh/bun
synced 2026-02-18 14:51:52 +00:00
Fixes issue #21376 where WebSocket clients would receive repeated messages when handling large payloads. The bug was caused by state management inconsistency in the websocket_client.zig consume() function. When a complete message was received, consume() would modify instance state (this.receive_body_remain = 0) but the caller handleData() was using local variables that would overwrite these changes at the end of the function. This fix removes the direct instance state modification from consume() and lets handleData() manage the state properly through its local variables. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>