Skip to content

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

Merged
normanmaurer merged 1 commit into
4.1from
opt_close
Dec 4, 2025
Merged

Close Channel and fail bootstrap when setting a ChannelOption causes …#15970
normanmaurer merged 1 commit into
4.1from
opt_close

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 4.1.129.Final milestone Dec 4, 2025
@normanmaurer normanmaurer merged commit ad85492 into 4.1 Dec 4, 2025
15 of 18 checks passed
@normanmaurer normanmaurer deleted the opt_close branch December 4, 2025 07:11
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