Author: remy.maucherat(a)jboss.com
Date: 2014-05-23 07:31:05 -0400 (Fri, 23 May 2014)
New Revision: 2415
Modified:
branches/7.4.x/src/main/java/org/apache/catalina/connector/InputBuffer.java
branches/7.4.x/src/main/java/org/apache/catalina/connector/OutputBuffer.java
Log:
BZ1100486: Try to resolve a discrepancy with Tomcat's behavior, since in the websocket
implementation nothing will actually close the connection, only the streams will be closed
(where they just close the socket). So try the usual close.
Modified: branches/7.4.x/src/main/java/org/apache/catalina/connector/InputBuffer.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/catalina/connector/InputBuffer.java 2014-05-23
11:29:12 UTC (rev 2414)
+++ branches/7.4.x/src/main/java/org/apache/catalina/connector/InputBuffer.java 2014-05-23
11:31:05 UTC (rev 2415)
@@ -257,6 +257,10 @@
public void close()
throws IOException {
closed = true;
+
+ if (request.getUpgradeHandler() != null) {
+ request.getEvent().close();
+ }
}
Modified: branches/7.4.x/src/main/java/org/apache/catalina/connector/OutputBuffer.java
===================================================================
---
branches/7.4.x/src/main/java/org/apache/catalina/connector/OutputBuffer.java 2014-05-23
11:29:12 UTC (rev 2414)
+++
branches/7.4.x/src/main/java/org/apache/catalina/connector/OutputBuffer.java 2014-05-23
11:31:05 UTC (rev 2415)
@@ -320,6 +320,10 @@
coyoteResponse.finish();
+ Request request = response.getRequest();
+ if (request.getUpgradeHandler() != null) {
+ request.getEvent().close();
+ }
}
Show replies by date