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

mvnd site:run stays running after mvnd process stops #1044

Open
bdemers opened this issue Jun 20, 2024 · 4 comments
Open

mvnd site:run stays running after mvnd process stops #1044

bdemers opened this issue Jun 20, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@bdemers
Copy link
Member

bdemers commented Jun 20, 2024

The embedded Jetty instance stays running after the mvnd bin process is stopped.

Tested with versions: 1.0.0 and 1.0.1 (currently under vote)

Steps to repro:
Clone https://github.com/apache/maven-site

Run mvnd site:run

open http://localhost:8080/ (everything works fine)
Back in your terminal kill the process: ^C

Refresh your browser (pages still load)
run mvnd --stop to kill the embedded jetty process

@bdemers bdemers added the bug Something isn't working label Jun 20, 2024
@cstamas
Copy link
Member

cstamas commented Aug 20, 2024

IMO this is more m-site-p bug than mvnd: the site:run does not offer any means to stop (in other words, it implicitly relies on the fact it is "local" in JVM and Ctrl+C stop it. It should probably have some prompt on console and once got input, cleanly stop?

@gnodet
Copy link
Contributor

gnodet commented Aug 20, 2024

When the client is aborted using Ctrl+C, it sends a message to the server to stop the build. I don't recall what the server does at this point, but if it's not done yet, maybe there's a way to interrupt the current threads.

condition.await(rem, TimeUnit.MILLISECONDS);

@cstamas
Copy link
Member

cstamas commented Aug 20, 2024

Yup, that kills probably the "main" thread (that sits to join on link above). But Jetty spawned already another non-daemon thread...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants