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> |
||
|---|---|---|
| .. | ||
| android | ||
| assets | ||
| ios/Runner/Assets.xcassets/AppIcon.appiconset | ||
| lib | ||
| test | ||
| .gitignore | ||
| .metadata | ||
| README.md | ||
| analysis_options.yaml | ||
| pubspec.lock | ||
| pubspec.yaml | ||
README.md
it0_app
A new Flutter project.
Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.