Merge pull request #4358 from pipecat-ai/filipi/fix_aiortc_sctp

Fixed SmallWebRTC data channel silently stalling on networks with a 1280-byte MTU
This commit is contained in:
Filipi da Silva Fuchter
2026-04-23 17:49:18 -03:00
committed by GitHub
3 changed files with 38 additions and 1 deletions

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

@@ -0,0 +1 @@
- Fixed SmallWebRTC data channel silently stalling on networks with a 1280-byte MTU (IPv6, Tailscale overlays, many consumer VPNs). aiortc's default SCTP chunk size of 1200 bytes produces ~1305-byte UDP datagrams after headers, which the kernel rejects with EMSGSIZE; aiortc has no path-MTU discovery so it retransmits forever at the same oversized size. The chunk size is now clamped to 1100 bytes (~1205-byte datagrams, ~75 bytes of slack). Override with `PIPECAT_SCTP_MAX_CHUNK_SIZE` if your path MTU requires a different value.