Skip to content

Commit

Permalink
improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxxoo committed Apr 6, 2022
1 parent daec7fd commit 5209065
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,14 @@ public static void main(String[] args) throws Exception {
HugeGraphServer.register();

HugeGraphServer server = new HugeGraphServer(args[0], args[1]);

/*
* HugeFactory.shutdown hook may be invoked before server stop,
* causes event-hub can't execute notification events for another
* shutdown executor such as gremling-stop-shutdown
*/
HugeFactory.removeShutdownHook();

CompletableFuture<?> serverStopped = new CompletableFuture<>();
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
LOG.info("HugeGraphServer stopping");
Expand Down

0 comments on commit 5209065

Please sign in to comment.