open-webui/backend/open_webui/socket
Claude 811df250ab
fix(stream): skip oversized single envelopes, catch timeout clear, bypass fence for ack events
Warning: the replay-cap \`and capped\` guard was letting the first
envelope through even when its own size exceeded the cap, defeating
the safety goal. Skip individual oversized envelopes entirely — the
final done checkpoint reconciles missed content.

Suggestion: the fence-fallback setTimeout called clearResumeFence
fire-and-forget. Wrap in .catch() so any future throw path doesn't
surface as an unhandled promise rejection.

Suggestion: call-style events carrying an ack callback now bypass
the replay fence. Holding them for up to RESUME_FENCE_TIMEOUT_MS
(10s) could exceed the backend's WEBSOCKET_EVENT_CALLER_TIMEOUT,
causing sio.call() to time out even though the client eventually
processes the event. Ack events don't carry seq and don't mutate
streamed content, so bypassing is safe against the replay race the
fence exists to prevent.
2026-04-15 08:33:48 +00:00
..
main.py fix(stream): skip oversized single envelopes, catch timeout clear, bypass fence for ack events 2026-04-15 08:33:48 +00:00
utils.py refac 2026-03-22 05:48:05 -05:00