Files
bun.sh/packages
Claude Bot 763b1b4a18 fix: QUIC stream data transfer now working
Fixed critical race condition in QUIC stream creation that prevented data transfer.

Key fixes:
1. **Synchronous callback race**: socket.createStream() was calling on_new_stream
   synchronously BEFORE the QuicStream was added to pending queue. Fixed by adding
   to pending queue BEFORE triggering lsquic stream creation.

2. **Open callback timing**: The open() callback was firing for client-created streams
   before socket.stream() returned, causing clientStream variable to be undefined.
   Fixed by only calling open() for incoming/server-initiated streams, not for
   streams from pending queue.

3. **Stream connection**: QuicStreams are now properly connected to lsquic streams
   when popped from pending queue, and buffered writes are flushed successfully.

Result: Full bidirectional QUIC data transfer now works:
- Client write → Server receive 
- Server write → Client receive 
- Echo functionality working 

Test "QUIC server and client integration" now passes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 16:12:36 +00:00
..