Skip to content

fix: bound received data channel messages before they are queued - #418

Merged
devopvoid merged 1 commit into
mainfrom
fix/channel-receive-limit
Oct 22, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix/channel-receive-limit

Conversation

@devopvoid

Copy link
Copy Markdown
Owner
  • Received messages count against a new PeerOptions.Builder.channelReceiveLimit (16 MiB by default) from the moment they arrive, before they are queued for the handlers, until the handlers are done with them. Messages kept while a channel has no handler count as well.
  • A channel that goes over the limit closes and its peer's onError handlers hear why, instead of letting the event queue grow without bound or dropping messages of a reliable channel. This replaces dropping the oldest messages kept without a handler.

Received messages count against a new PeerOptions channelReceiveLimit (16 MiB by default) from the moment they arrive until the handlers are done with them, including those kept while a channel has no handler. A channel that goes over it closes and reports why, instead of growing the event queue or dropping messages.
@devopvoid
devopvoid merged commit 04611fc into main Oct 22, 2026
39 of 40 checks passed
@devopvoid
devopvoid deleted the fix/channel-receive-limit branch October 22, 2026 21:50
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