Skip to content

Local transport: shutdown hook should call closeNow to be conistent with what LocalIoHandler will call#16406

Merged
normanmaurer merged 1 commit into
4.2from
shutdown_hook
Mar 6, 2026
Merged

Local transport: shutdown hook should call closeNow to be conistent with what LocalIoHandler will call#16406
normanmaurer merged 1 commit into
4.2from
shutdown_hook

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

Motivation:

When LocalIoHandler is used it will call closeNow() to handle the close of the Local*Channel when destroyed. We should use the the same method when using a shutdown hook to do the same to make things consistent.

Modifications:

  • Move shutdownHook to inner class as it is where it is used.
  • call closeNow to make it conistent

Result:

Cleanup

…ith what LocalIoHandler will call

Motivation:

When LocalIoHandler is used it will call closeNow() to handle the close of the Local*Channel when destroyed. We should use the the same method when using a shutdown hook to do the same to make things consistent.

Modifications:
- Move shutdownHook to inner class as it is where it is used.
- call closeNow to make it conistent

Result:

Cleanup
@normanmaurer normanmaurer added this to the 4.2.11.Final milestone Mar 6, 2026
@normanmaurer normanmaurer added the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Mar 6, 2026
@normanmaurer normanmaurer merged commit d92d5e5 into 4.2 Mar 6, 2026
20 checks passed
@normanmaurer normanmaurer deleted the shutdown_hook branch March 6, 2026 15:57
@netty-project-bot
Copy link
Copy Markdown
Contributor

Could not create auto-port PR.
Got conflicts when cherry-picking onto 5.0.

@chrisvest chrisvest removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Mar 9, 2026
@chrisvest
Copy link
Copy Markdown
Member

I think the shutdown hook concept was removed in 5.0, so no cherry-pick needed.

@normanmaurer
Copy link
Copy Markdown
Member Author

@chrisvest yes... forgot to remove the label.. thanks

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.

3 participants