Skip to content

Commit d8577f0

Browse files
authored
Merge pull request #206 from TheTransitClock/tc_issue_205
Remove shutdown from hook as it stops SIGTERM working.
2 parents bd4cbd5 + 5261802 commit d8577f0

File tree

1 file changed

+7
-3
lines changed
  • transitclock/src/main/java/org/transitclock/applications

1 file changed

+7
-3
lines changed

transitclock/src/main/java/org/transitclock/applications/Core.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -538,14 +538,18 @@ public static void main(String[] args) {
538538
public void run()
539539
{
540540
try {
541+
System.out.println("Calling shutdown hook.");
541542
logger.info("Closing cache.");
543+
System.out.println("Closing cache...");
542544
CacheManagerFactory.getInstance().close();
543545
logger.info("Cache closed.");
546+
System.out.println("Cache closed.");
544547
} catch (Exception e) {
545-
logger.error("Cache close failed.");
548+
System.out.println("Cache close failed.");
549+
e.printStackTrace();
550+
logger.error("Cache close failed...");
546551
logger.error(e.getMessage(),e);
547-
}
548-
System.exit(0);
552+
}
549553
}
550554
}));
551555

0 commit comments

Comments
 (0)