You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2020/02/21 19:25:56 UTC
[cxf] branch 3.3.x-fixes updated: [CXF-8219] upgrade to netty
4.1.45.Final
This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.3.x-fixes by this push:
new 675ffaf [CXF-8219] upgrade to netty 4.1.45.Final
675ffaf is described below
commit 675ffafd20b90a0424340c5bf0725e5450ec3937
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Thu Feb 20 16:52:10 2020 -0500
[CXF-8219] upgrade to netty 4.1.45.Final
(cherry picked from commit 63bf9f47225aa4d79ea0ab60a1fdb609cee87514)
---
parent/pom.xml | 2 +-
.../cxf/transport/http/netty/client/NettyHttpConduit.java | 15 ++++++++++++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/parent/pom.xml b/parent/pom.xml
index 400d332..701b085 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -167,7 +167,7 @@
<cxf.msv.version>2013.6.1</cxf.msv.version>
<cxf.neethi.version>3.1.1</cxf.neethi.version>
<cxf.netty.version.range>[4,5)</cxf.netty.version.range>
- <cxf.netty.version>4.1.42.Final</cxf.netty.version>
+ <cxf.netty.version>4.1.45.Final</cxf.netty.version>
<cxf.oauth.version>20100527</cxf.oauth.version>
<cxf.olingo.version>2.0.11</cxf.olingo.version>
<cxf.openjpa.version>3.1.0</cxf.openjpa.version>
diff --git a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
index 7bd3a2e..cef980e 100644
--- a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
+++ b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
@@ -305,9 +305,13 @@ public class NettyHttpConduit extends URLConnectionHTTPConduit implements BusLif
}
}
};
- ChannelFuture channelFuture = getChannel().write(entity);
- channelFuture.addListener(listener);
- outputStream.close();
+
+ synchronized (entity) {
+ Channel syncChannel = getChannel();
+ ChannelFuture channelFuture = syncChannel.write(entity);
+ channelFuture.addListener(listener);
+ outputStream.close();
+ }
}
};
@@ -348,13 +352,18 @@ public class NettyHttpConduit extends URLConnectionHTTPConduit implements BusLif
public void operationComplete(ChannelFuture future) throws Exception {
if (future.isSuccess()) {
setChannel(future.channel());
+
SslHandler sslHandler = channel.pipeline().get(SslHandler.class);
+
if (sslHandler != null) {
session = sslHandler.engine().getSession();
}
} else {
setException(future.cause());
}
+ synchronized (entity) {
+ //ensure entity is write in main thread
+ }
}
};