Author: remy.maucherat(a)jboss.com
Date: 2015-01-20 11:45:35 -0500 (Tue, 20 Jan 2015)
New Revision: 2583
Modified:
branches/7.5.x/src/main/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
Log:
BZ1182241: Improve compatibility with buffered streams (as used in web)
Modified:
branches/7.5.x/src/main/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
===================================================================
---
branches/7.5.x/src/main/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java 2015-01-20
16:14:18 UTC (rev 2582)
+++
branches/7.5.x/src/main/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java 2015-01-20
16:45:35 UTC (rev 2583)
@@ -101,12 +101,14 @@
}
}
if (complete) {
- wsWriteTimeout.unregister(this);
- clearHandler(null, useDispatch);
- // Explicit flush for compatibility with buffered streams
sos.flush();
- if (close) {
- close();
+ complete = sos.isReady();
+ if (complete) {
+ wsWriteTimeout.unregister(this);
+ clearHandler(null, useDispatch);
+ if (close) {
+ close();
+ }
}
break;
}
Show replies by date