Skip to content

Close Channel and fail bootstrap when setting a ChannelOption causes …#15972

Merged
normanmaurer merged 1 commit into
5.0from
close5
Dec 4, 2025
Merged

Close Channel and fail bootstrap when setting a ChannelOption causes …#15972
normanmaurer merged 1 commit into
5.0from
close5

Conversation

@normanmaurer

Copy link
Copy Markdown
Member

…… (#15896)

…an error

Motivation:

We should close the Channel and fail the future of the bootstrap if during setting a ChannelOption we observe an error. At the moment we just log which might make things hard to debug and leave the Channel in an unexpected state.

People can go back to the old behavior by using -Dio.netty.bootstrap.closeOnSetOptionFailure=false.

Modifications:

  • Adjust code to also close and faile the future
  • Add testcases

Result:

Related to
#15860 (comment)

#15896)

…an error

Motivation:

We should close the Channel and fail the future of the bootstrap if
during setting a ChannelOption we observe an error. At the moment we
just log which might make things hard to debug and leave the Channel in
an unexpected state.

People can go back to the old behavior by using `-Dio.netty.bootstrap.closeOnSetOptionFailure=false`.

Modifications:

- Adjust code to also close and faile the future
- Add testcases

Result:

Related to
#15860 (comment)
@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Dec 4, 2025
@normanmaurer normanmaurer merged commit fd81bb8 into 5.0 Dec 4, 2025
12 of 13 checks passed
@normanmaurer normanmaurer deleted the close5 branch December 4, 2025 12:30
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