-
Notifications
You must be signed in to change notification settings - Fork 156
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
Make sure Vertx is closed #290
Conversation
|
||
// | ||
// Note well! This cannot be a static final field. | ||
// UnifiedJavaVirtualMachineConfigurationTest hangs if it is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why?
@@ -23,4 +32,14 @@ protected Vertx vertx() { | |||
return vertx; | |||
} | |||
|
|||
public void close() { | |||
vertx().close(result -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am concerned that this is a race condition in cases where there is more than 1 channel setup. I've not seen Censum not shutdown because of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run the sample in the gctoolkit repository from the main branch. The app should exit when main exits. It does not. One should not have to explicitly call System.exit().
I would like to know if this issue has been resolved yet. I have downloaded the source code for version 3.0.4 and ran the sample program, but the program still does not end even after the Main function has finished executing.
The version of Java I am using is as follows:
Is there any solution to this now, or is it a problem with my configuration? |
@zheng-kai PR #291 should fix the problem. At least, it works on my machine. The the IllegalStateException is not a problem (still, I'll create an issue for it). |
Hi @zheng-kai, I believe there should be code in to prevent your app from hanging. I'll take a look to see where that is. |
The issue is that the JVM won't exit. Closing Vertx fixes that.