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 16:27:52 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 698a3ca50 -> 1cb545acd


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/1cb545ac
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1cb545ac
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1cb545ac

Branch: refs/heads/master
Commit: 1cb545acdaf0257cad6aff1445ba3ba41ce27673
Parents: 698a3ca
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 18:26:34 2016 +0200

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/1cb545ac/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 b687d57..e019cf9 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
@@ -144,6 +144,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. 
@@ -160,10 +164,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