Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add graceful shutdown support, returning UndertowWrapper object #34

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

nikolap
Copy link
Member

@nikolap nikolap commented Dec 16, 2024

Resolves #33

Note: this is a breaking change in Java-land, since the object returned is an UndertowWrapper class and not an Undertow class. We sadly cannot proxy Undertow as it is final. An interface or other delegation doesn't work for the same reason.

The option here is to create a wrapper class that exposes all the public methods from Undertow as the same. However, since Undertow is public we still cannot cast to it. As a result, we add a new method getUndertow which returns the original object.

Projects which use this lib and don't check explicitly for the class match should be unaffected so I think it is a low risk breaking change.

@nikolap nikolap requested a review from yogthos December 16, 2024 15:19
@nikolap nikolap mentioned this pull request Dec 16, 2024
@rutchkiwi
Copy link

@nikolap wow, you're the best! Thanks.

I've tested this locally now and it works perfectly.

If you want any feedback, it might be nice to write that the default is no timeout in the docs. But it's great!

src/ring/adapter/undertow.clj Outdated Show resolved Hide resolved
@nikolap nikolap merged commit 5d39a17 into master Dec 17, 2024
@nikolap nikolap deleted the feat/undertow-wrapper-with-graceful-shutdown branch December 17, 2024 15:12
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.

Graceful shutdown
3 participants