it0/it0_app/lib
hailin 7b71a4f2fc fix: properly close WebSocket with subscription cancel + fire-and-forget
Root cause: IOWebSocketChannel.sink.close() can hang indefinitely
(dart-lang/web_socket_channel#185). Previous fix used unawaited close
but didn't cancel the stream subscription, so the old listener could
still push events to _messageController.

Fix: Extract _closeCurrentConnection() that:
1. Cancels StreamSubscription first (stops duplicate events immediately)
2. Fire-and-forget sink.close(goingAway) (frees underlying socket)

This follows the workaround recommended in the official issue tracker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 03:45:43 -08:00
..
core fix: properly close WebSocket with subscription cancel + fire-and-forget 2026-02-25 03:45:43 -08:00
features feat: multi-turn conversation context management with session history UI 2026-02-24 19:04:35 -08:00
app.dart feat: 完成 iAgent App 三大功能 + 修复租户上下文 2026-02-23 01:10:52 -08:00
main.dart fix: 根治 Unhandled Exception — async void 拦截器 + 全局错误兜底 2026-02-23 04:37:39 -08:00