-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(all):make @PreDestroy work #5421
feat(all):make @PreDestroy work #5421
Conversation
a2c6f25
to
8bbd98c
Compare
super.destroy(); | ||
super.doClose(); | ||
logger.info("******** close end ********"); | ||
FullNode.shutDownSign = true; |
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.
Should the shutDownSign be assigned once the validate executor be closed? Is this reasonable to be here?
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.
You can find something in here, #4020.
if (channelFull != null) { | ||
channelFull.shutdown().awaitTermination(5, TimeUnit.SECONDS); | ||
} | ||
if (channelSolidity != null) { | ||
channelSolidity.shutdown().awaitTermination(5, TimeUnit.SECONDS); |
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.
What if the channelSolidity have not been shut down after 5 seconds?
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.
Waits for the channel to become terminated, giving up if the timeout is reached.
@@ -23,19 +22,13 @@ public TronApplicationContext(String... basePackages) { | |||
} | |||
|
|||
@Override | |||
public void destroy() { |
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.
Shouldn't all the places where the destroy method is called be replaced, including all test code?
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.
close #5420