Skip to content

fix: keep local track releases independent of handlers and cancelled futures - #444

Merged
devopvoid merged 1 commit into
mainfrom
fix/track-close-futures
Oct 25, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix/track-close-futures

Conversation

@devopvoid

Copy link
Copy Markdown
Owner
  • LocalTrack.onEnded and Devices.onChange handlers, and the futures of camera and device switches, run on an event executor of local media instead of the media executor. A track is released first, so a handler that waits for a close no longer deadlocks; the wait is refused with a BlockingCallException.
  • Lifecycle futures (LocalTrack.closeAsync, WebRtc.closeAsync, Peer.whenClosed/closeAsync/whenConnected, DataChannel.whenOpen, HttpSession.closeAsync) are handed out as copies. Cancelling one no longer fails the runtime's close or affects other callers.

…futures

Ended and device handlers run on an event executor of local media, after
the release completed internally. Lifecycle futures are handed out as
copies, so cancelling one no longer fails the runtime's close.
@devopvoid
devopvoid merged commit 67d5750 into main Oct 25, 2026
25 checks passed
@devopvoid
devopvoid deleted the fix/track-close-futures branch October 25, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant