You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/07/05 19:22:06 UTC
svn commit: r1500075 - in /tomcat/trunk/java/org/apache/tomcat/websocket:
AsyncChannelWrapperSecure.java LocalStrings.properties
Author: markt
Date: Fri Jul 5 17:22:06 2013
New Revision: 1500075
URL: http://svn.apache.org/r1500075
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55200
It is possible that more than one write will be required to empty the buffer.
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java?rev=1500075&r1=1500074&r2=1500075&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java Fri Jul 5 17:22:06 2013
@@ -214,13 +214,12 @@ public class AsyncChannelWrapperSecure i
socketWriteBuffer.flip();
// Do the write
- Future<Integer> f = socketChannel.write(socketWriteBuffer);
- Integer socketWrite = f.get();
- if (socketWrite.intValue() != r.bytesProduced()) {
- throw new IOException(sm.getString(
- "asyncChannelWrapperSecure.writeFail",
- Integer.valueOf(socketWrite.intValue()),
- Integer.valueOf(r.bytesProduced())));
+ int toWrite = r.bytesProduced();
+ while (toWrite > 0) {
+ Future<Integer> f =
+ socketChannel.write(socketWriteBuffer);
+ Integer socketWrite = f.get();
+ toWrite -= socketWrite.intValue();
}
}
}
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties?rev=1500075&r1=1500074&r2=1500075&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/LocalStrings.properties Fri Jul 5 17:22:06 2013
@@ -22,7 +22,6 @@ asyncChannelWrapperSecure.statusWrap=Une
asyncChannelWrapperSecure.tooBig=The result [{0}] is too big to be expressed as an Integer
asyncChannelWrapperSecure.wrongStateRead=Flag that indicates a read is in progress was found to be false (it should have been true) when trying to complete a read operation
asyncChannelWrapperSecure.wrongStateWrite=Flag that indicates a write is in progress was found to be false (it should have been true) when trying to complete a write operation
-asyncChannelWrapperSecure.writeFail=Only wrote [{0}] of [{1}] bytes
backgroundProcessManager.processFailed=A background process failed
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org