Merge pull request #3962 from pipecat-ai/filipi/smallwebrtc_queue

Queuing the messages received before the data channel is ready
This commit is contained in:
Filipi da Silva Fuchter
2026-03-09 10:29:05 -04:00
committed by GitHub
2 changed files with 87 additions and 1 deletions

1
changelog/3962.fixed.md Normal file
View File

@@ -0,0 +1 @@
- Fixed `SmallWebRTCConnection` silently discarding messages sent before the data channel is open by queuing them and flushing once the channel is ready. A bounded queue (`MAX_MESSAGE_QUEUE_SIZE = 50`) prevents unbounded memory growth, and a 10-second timeout after connection clears the queue and falls back to discard mode if the data channel never opens.