cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject cxf git commit: intercept SSE's close for CXF-5855
Date Tue, 05 Apr 2016 17:47:48 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes ab1e3ebf0 -> 1b30b3c83


intercept SSE's close for CXF-5855


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

Branch: refs/heads/3.1.x-fixes
Commit: 1b30b3c83db2ae9a236d4c91285bae161fcc6f4f
Parents: ab1e3eb
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Tue Apr 5 18:26:00 2016 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Tue Apr 5 19:41:15 2016 +0200

----------------------------------------------------------------------
 .../websocket/atmosphere/DefaultProtocolInterceptor.java     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/1b30b3c8/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
index 2631d51..54d8645 100644
--- a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
+++ b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
@@ -142,6 +142,10 @@ public class DefaultProtocolInterceptor extends AtmosphereInterceptorAdapter
{
                     suspendedResponse.flushBuffer();
                     return this;
                 }
+
+                @Override
+                public void close(AtmosphereResponse response) throws IOException {
+                }
             });
             // REVISIT we need to keep this response's asyncwriter alive so that data can
be written to the 
             //   suspended response, but investigate if there is a better alternative. 
@@ -158,10 +162,6 @@ public class DefaultProtocolInterceptor extends AtmosphereInterceptorAdapter
{
                 suspendedResponses.put(srid, event.getResource().getResponse());
 
                 AsyncIOWriter writer = event.getResource().getResponse().getAsyncIOWriter();
-                if (writer == null) {
-                    writer = new AtmosphereInterceptorWriter();
-                    r.getResponse().asyncIOWriter(writer);
-                }
                 if (writer instanceof AtmosphereInterceptorWriter) {
                     ((AtmosphereInterceptorWriter)writer).interceptor(interceptor);
                 }


Mime
View raw message