Skip to content

stream reader: Propagate setopts/3 failures#16937

Open
the-mikedavis wants to merge 1 commit into
mainfrom
md/stream-reader-setopts-err
Open

stream reader: Propagate setopts/3 failures#16937
the-mikedavis wants to merge 1 commit into
mainfrom
md/stream-reader-setopts-err

Conversation

@the-mikedavis

Copy link
Copy Markdown
Collaborator

Attempting to set an option like {nopush, boolean() or {active, once} on a socket which was closed (due to dropped packets or a network partition for example) can return an error like

{error, {options, {socket_options, [{nopush, true}], einval}}}

We can propagate these errors up to prevent the crash from the hard match on ok. This change propagates the result for both nopush and {active, once} settings.

I found this through some jepsen testing which included partitioning via iptables DROP commands.

Attempting to set an option like `{nopush, boolean()` or
`{active, once}` on a socket which was closed (due to dropped packets or
a network partition for example) can return an error like

    {error, {options, {socket_options, [{nopush, true}], einval}}}

We can propagate these errors up to prevent the crash from the hard
match on `ok`. This change propagates the result for both `nopush` and
`{active, once}` settings.
@the-mikedavis the-mikedavis self-assigned this Jul 14, 2026
@mergify

mergify Bot commented Jul 14, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant