Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1007#discussion_r100815323
  
    --- Diff: 
artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java
 ---
    @@ -145,9 +146,16 @@ public void internalStop() throws Exception {
                    //tmpdir will be removed by deleteOnExit()
                    //somehow when broker is stopped and restarted quickly
                    //this tmpdir won't get deleted sometimes
    -               boolean fileDeleted = TimeUtils.waitOnBoolean(false, 10000, 
tmpdir::exists);
    +               boolean fileDeleted = TimeUtils.waitOnBoolean(false, 5000, 
tmpdir::exists);
                    if (!fileDeleted) {
    -                  ActiveMQWebLogger.LOGGER.tmpFileNotDeleted(tmpdir);
    +                  //because the execution order of shutdown hooks are
    +                  //not determined, so it's possible that the deleteOnExit
    +                  //is executed after this hook, in that case we force a 
delete.
    +                  FileUtil.deleteDirectory(tmpdir);
    +                  ActiveMQWebLogger.LOGGER.tmpFileForceDelete(tmpdir);
    --- End diff --
    
    ActiveMQWebLogger.LOGGER.debug("..."); would also work... but I prefer to 
have the actual logger on debug or trace


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to