chore: bump flutter_webrtc to 1.6.2+hotfix.2 - #1203
Conversation
Picks up the Darwin fix that releases the peer connection event channel handlers on dispose instead of close, which removes the MissingPluginException for cancel on FlutterWebRTC/peerConnectionEvent seen on every full reconnect, plus the Android data channel handler cleanup and the Windows and Linux disposal crash fix. The WebRTC-SDK pod pin is unchanged at 150.7871.01 on both sides. The lock file was still resolving 1.6.0 and now follows the pubspec.
|
|
||
| # Fix version to avoid version conflicts between WebRTC-SDK pods, which both this package and flutter_webrtc depend on. | ||
| flutter_webrtc: 1.6.2+hotfix.1 | ||
| flutter_webrtc: 1.6.2+hotfix.2 |
There was a problem hiding this comment.
🔴 Desktop teardown leaks peer connections
On Windows and Linux, flutter_webrtc now requires disposal before close, but Transport keeps the reverse order. The first close removes the native lookup entry, so disposal cannot release its observer. Each teardown retains a peer connection and observer, accumulating native resources across reconnects.
Learn more
The upgraded desktop implementation splits teardown across two platform calls. peerConnectionDispose closes the native connection while its observer remains alive, unregisters that observer, and leaves the connection map entry for peerConnectionClose to remove. Transport disposal sends those calls in the opposite order. The first call removes the map entry, so the second call returns without reaching observer teardown. The observer owns a reference to the native peer connection, leaving both allocated.
Example: A Windows client reconnects ten times. Each old publisher and subscriber transport calls close() before dispose(). All twenty native observers and their peer connections remain retained instead of being released.
Recommended fix: Reverse the calls in Transport so it awaits pc.dispose() before pc.close() on the affected implementation. Verify this ordering on every supported platform, then add a Windows/Linux teardown regression that exercises the SDK's actual Transport sequence.
Was this helpful? React with 👍 or 👎 to provide feedback.
Bumps the exact
flutter_webrtcpin to 1.6.2+hotfix.2 (published today) and updatespubspec.lock, which was still resolving 1.6.0.Picks up the Darwin fix for
MissingPluginExceptionon peer connection dispose, Android data channel handler cleanup, and the Windows/Linux disposal crash fix. WebRTC-SDK pod stays at 150.7871.01 on both sides.Supersedes #1195.
🤖 Generated with Claude Code