mirror of
https://github.com/langgenius/dify.git
synced 2026-03-26 00:38:03 +08:00
The current frontend implementation closes the connection once `workflow_paused` SSE event is received and establish a new connection to subscribe new events. The implementation of `StreamsBroadcastChannel` sets initial `_last_id` to `0-0`, consumes streams from start and send `workflow_paused` event created before pauses to frontend, causing excessive connections being established. This PR fixes the issue by setting initial id to `$`, which means only new messages are received by the subscription.