Skip to content

fix: harden data channel sends and runtime close - #408

Merged
devopvoid merged 4 commits into
mainfrom
fix/client-robustness
Oct 22, 2026
Merged

devopvoid merged 4 commits into
mainfrom
fix/client-robustness

Conversation

@devopvoid

Copy link
Copy Markdown
Owner
  • Synchronous data channel sends check the byte array and catch C++ exceptions, like the async ones.
  • WebRtc.closeAsync() fails when the factory is left undisposed instead of completing normally.
  • PeerOptions.channelSendLimit (16 MiB by default) bounds what a data channel holds in Java; sends beyond it fail with ChannelFullException.

… data channel sends

sendByteArrayBuffer used the result of GetByteArrayElements unchecked and built the buffer outside the catch; both sync paths now follow the async ones.
A close that leaks the factory to protect WebRTC's threads no longer completes normally, so callers can tell it from a full release.
PeerOptions.channelSendLimit (16 MiB by default) caps the bytes each channel holds in Java; a send beyond it fails at once with a ChannelFullException.
@devopvoid
devopvoid marked this pull request as ready for review October 21, 2026 23:12
# Conflicts:
#	webrtc/src/main/java/dev/onvoid/webrtc/client/WebRtc.java
@devopvoid
devopvoid merged commit 7b4cf57 into main Oct 22, 2026
38 of 39 checks passed
@devopvoid
devopvoid deleted the fix/client-robustness branch October 22, 2026 06:12
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