cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/4] cxf git commit: change evt cast type IdleStateHandler triggered IdleStateEvent, not IdleState This closes #252
Date Thu, 30 Mar 2017 16:03:06 GMT
change evt cast type
IdleStateHandler triggered IdleStateEvent, not IdleState
This closes #252


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/fedfefea
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/fedfefea
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/fedfefea

Branch: refs/heads/3.1.x-fixes
Commit: fedfefea62fb5d852e2310f7ca6594a7e6e3b41a
Parents: 2f22341
Author: msamoylych <msamoylych@users.noreply.github.com>
Authored: Thu Mar 30 16:16:28 2017 +0300
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Thu Mar 30 12:02:55 2017 -0400

----------------------------------------------------------------------
 .../http/netty/server/NettyHttpServletHandler.java          | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/fedfefea/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletHandler.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletHandler.java
b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletHandler.java
index 3c241be..33422f5 100644
--- a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletHandler.java
+++ b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletHandler.java
@@ -50,6 +50,7 @@ import io.netty.handler.codec.http.HttpResponse;
 import io.netty.handler.codec.http.HttpResponseStatus;
 import io.netty.handler.codec.http.HttpVersion;
 import io.netty.handler.timeout.IdleState;
+import io.netty.handler.timeout.IdleStateEvent;
 import io.netty.util.CharsetUtil;
 
 public class NettyHttpServletHandler extends ChannelInboundHandlerAdapter {
@@ -87,10 +88,10 @@ public class NettyHttpServletHandler extends ChannelInboundHandlerAdapter
{
    
     @Override
     public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception
{
-        if (evt instanceof IdleState) {
-            IdleState e = (IdleState) evt;
-            if (e == IdleState.READER_IDLE || e == IdleState.WRITER_IDLE) {
-                LOG.log(Level.FINE, "Closing idle channel: {}", e);
+        if (evt instanceof IdleStateEvent) {
+            IdleStateEvent e = (IdleStateEvent) evt;
+            if (e.state() == IdleState.READER_IDLE || e.state() == IdleState.WRITER_IDLE)
{
+                LOG.log(Level.FINE, "Closing idle channel: {}", e.state());
                 ctx.close();
             } 
         }


Mime
View raw message