mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-08-11 15:28:37 +00:00
MemoryStreamBridge is the DEFAULT stream backend. Its subscribe() creates a fresh ended=False stream on every call via _get_or_create_stream(), but the Gateway's reconnect guard _terminal_record_stream_missing only detects a missing stream on bridges that expose stream_exists — and MemoryStreamBridge did NOT define it (only RedisStreamBridge did). After worker cleanup pops the stream (~60s post-run), a browser SSE reconnect or POST /wait hits subscribe() -> creates a zombie stream -> yields heartbeat forever without ever sending END_SENTINEL. The UI spinner never resolves and the coroutine pins a server-side connection/request until external timeout. Add the missing stream_exists method, mirroring RedisStreamBridge.