Repository: logging-log4j2 Updated Branches: refs/heads/master a114c3bf8 -> 1f06ca46b
LOG4J2-1786 ConfigurationScheduler should preserve interrupt flag during stop. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/1f06ca46 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/1f06ca46 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/1f06ca46 Branch: refs/heads/master Commit: 1f06ca46bf38d545af3c6e93bf2925052c292c12 Parents: a114c3b Author: rpopma <[email protected]> Authored: Sun Jan 15 11:27:43 2017 +0900 Committer: rpopma <[email protected]> Committed: Sun Jan 15 11:27:43 2017 +0900 ---------------------------------------------------------------------- .../logging/log4j/core/config/ConfigurationScheduler.java | 7 ++++--- src/changes/changes.xml | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/1f06ca46/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java index 6c639f2..4839e75 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java @@ -56,14 +56,15 @@ public class ConfigurationScheduler extends AbstractLifeCycle { executorService.shutdown(); try { executorService.awaitTermination(timeout, timeUnit); - } catch (InterruptedException ie) { + } catch (final InterruptedException ie) { executorService.shutdownNow(); try { executorService.awaitTermination(timeout, timeUnit); - } catch (InterruptedException inner) { + } catch (final InterruptedException inner) { LOGGER.warn("ConfigurationScheduler stopped but some scheduled services may not have completed."); } - + // Preserve interrupt status + Thread.currentThread().interrupt(); } } setStopped(); http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/1f06ca46/src/changes/changes.xml ---------------------------------------------------------------------- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 8accf57..d69cec5 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -24,6 +24,9 @@ </properties> <body> <release version="2.8" date="2017-MM-DD" description="GA Release 2.8"> + <action issue="LOG4J2-1786" dev="rpopma" type="fix"> + ConfigurationScheduler should preserve interrupt flag during stop. + </action> <action issue="LOG4J2-1243" dev="rgoers" type="add"> Allow default value in property to be a Lookup. </action>
