You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2016/12/12 21:17:54 UTC
logging-log4j2 git commit: [LOG4J2-1734]
Repository: logging-log4j2
Updated Branches:
refs/heads/master 717da184d -> e040b7693
[LOG4J2-1734]
SslSocketManagerFactory might leak Sockets when certain startup errors
occur.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/e040b769
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/e040b769
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/e040b769
Branch: refs/heads/master
Commit: e040b7693276876d4d786850dcd4488d79dd5df5
Parents: 717da18
Author: Gary Gregory <gg...@apache.org>
Authored: Mon Dec 12 13:17:52 2016 -0800
Committer: Gary Gregory <gg...@apache.org>
Committed: Mon Dec 12 13:17:52 2016 -0800
----------------------------------------------------------------------
.../java/org/apache/logging/log4j/core/net/SslSocketManager.java | 2 ++
src/changes/changes.xml | 3 +++
2 files changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e040b769/log4j-core/src/main/java/org/apache/logging/log4j/core/net/SslSocketManager.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/SslSocketManager.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/SslSocketManager.java
index 269c319..45b4848 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/SslSocketManager.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/SslSocketManager.java
@@ -32,6 +32,7 @@ import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.core.Layout;
import org.apache.logging.log4j.core.appender.ManagerFactory;
import org.apache.logging.log4j.core.net.ssl.SslConfiguration;
+import org.apache.logging.log4j.core.util.Closer;
import org.apache.logging.log4j.util.Strings;
/**
@@ -185,6 +186,7 @@ public class SslSocketManager extends TcpSocketManager {
os = new ByteArrayOutputStream();
} catch (final TlsSocketManagerFactoryException e) {
LOGGER.catching(Level.DEBUG, e);
+ Closer.closeSilently(socket);
return null;
}
return new SslSocketManager(name, os, socket, data.sslConfiguration, inetAddress, data.host, data.port,
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e040b769/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index ac83490..309de95 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -156,6 +156,9 @@
<action issue="LOG4J2-1474" dev="ggregory" type="fix" due-to="yin mingjun, Neon">
CronTriggeringPolicy raise exception and fail to rollover log file when evaluateOnStartup is true.
</action>
+ <action issue="LOG4J2-1734" dev="ggregory" type="fix">
+ SslSocketManagerFactory might leak Sockets when certain startup errors occur.
+ </action>
<action issue="LOG4J2-1644" dev="ggregory" type="update" due-to="Tim Gokcen, Pavel Sivolobtchik">
Inefficient locking in AbstractLoggerAdapter.
</action>