Skip to content

fix: call network thread observers on a callback thread - #364

Merged
devopvoid merged 1 commit into
mainfrom
fix/network-thread-observers
Oct 13, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix/network-thread-observers

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

From M155 the network thread is also WebRTC's worker thread. DTLS transport observers and data channel send observers were called on it, so a WebRTC call from them that needs the worker thread, such as RTCRtpSender.getParameters(), deadlocked every connection of the factory.

  • These observers now run in order on a shared, JVM-attached callback thread (JavaCallbackThread).
  • RTCDtlsTransport.unregisterObserver() still guarantees no further events once it returns.
  • The Javadoc and the data channel guide describe the new callback thread.

From M155 the network thread is also the worker thread. DTLS transport and data channel send observers ran on it, so a WebRTC call from them that needs the worker thread deadlocked. They now run in order on a shared JVM-attached thread.
@devopvoid
devopvoid added this pull request to stack #367 October 13, 2026 21:36
@devopvoid
devopvoid merged commit 6e47519 into main Oct 13, 2026
25 checks passed
@devopvoid
devopvoid deleted the fix/network-thread-observers branch October 13, 2026 22:35
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