[1/4] NetherNet signaling reliability - #7
Open
SendableMetatype wants to merge 3 commits into
Open
Conversation
Kas-tle
commented
Jul 7, 2026
Owner
Thank you for the PR. I will review this weekend. |
SendableMetatypeforce-pushed
the
nethernet-improvements
branch
from
August 2, 2026 18:28
3fbf5f1 to
dcb7f30Compare
This was referenced Aug 2, 2026
reconnect(freshToken) replaces only the socket to the signaling service. The signaling instance, its handlers, and everything built on it (server channel, WebRTC factories, live peer connections) survive, so a signaling drop no longer requires tearing the transport down. Liveness is now detectable on idle servers: a WebSocket protocol ping every 15 seconds guarantees inbound pongs on a healthy socket, so isChannelAlive(maxSilence) also catches silently half open TCP. Per channel scheduled tasks are tracked and cancelled on channel inactive, so reconnects no longer leak ping loops. TURN credential pushes are applied for the lifetime of the socket instead of only during connect, and the JSON RPC endpoint refreshes credentials every 30 minutes, so late joining peers no longer receive expired relay credentials. Pending RPC requests fail fast when the socket dies. The frame aggregator limit is raised to 128 KB for batched RPC frames.
Each in flight JSON RPC request now records the WebSocket channel it was written to. When a socket dies, onChannelInactive fails only the requests that were sent on that socket: during a reconnect the old channel's inactive event can no longer fail requests already written to the replacement socket, which previously left those callers with a spurious ClosedChannelException while the reply was still on its way.
The object or array check introduced with the params support tested the message envelope, which is always a JSON object, so the array branch could never run: array form params fell into the object branch, where getAsJsonObject throws on an array and the delivery was lost. The check now tests the params element itself. Batched frames are where array form params appear, so those deliveries were being dropped.
SendableMetatypeforce-pushed
the
nethernet-improvements
branch
from
August 5, 2026 10:08
dcb7f30 to
f10df32Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A set of improvements from running the NetherNet transport on a production Geyser deployment, where frequent signaling drops at player counts above 30 motivated most of this.
First PR of a stack rebuilding the transport for high player counts: this one, then the transport core behind a backend seam, then HTTP signaling, then RTT exposure. This layer is standalone: it compiles against released webrtc-java 1.0.3 and merges on its own. Everything here has run in production through Geyser for about a month and is confirmed working; the array params fix is newer, from a pre submission review.