Skip to content

When a request is active, Undertow prevents the JVM from exiting #21319

@wilkinsona

Description

@wilkinsona

The XNIO threads created by Undertow are non-daemon threads so they keep the JVM alive. If a request is active when the JVM is exiting, the XNIO thread that is handling the request will keep the JVM alive. The fix isn't as simple as configuring XNIO to create daemon threads as this then results in the JVM exiting as soon as the main method exits as there are no non-daemon threads to keep it alive.

It looks like we need to do the same as we do for Tomcat and create a non-daemon thread that doesn't exit until the web server is stopped.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions